From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix assorted infelicities in new SetWALSegSize() function. |
Date: | 2017-09-24 16:05:09 |
Message-ID: | E1dw9P3-0007Xc-Ec@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix assorted infelicities in new SetWALSegSize() function.
* Failure to check for malloc failure (ok, pretty unlikely here, but
that's not an excuse).
* Leakage of open fd on read error, and of malloc'd buffer always.
* Incorrect assumption that a short read would set errno to zero.
* Failure to adhere to message style conventions (in particular,
not reporting errno where relevant; using "couldn't open" rather than
"could not open" is not really in line with project style either).
* Missing newlines on some messages.
Coverity spotted the leak problems; I noticed the rest while
fixing the leaks.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8485a25a8c9a419ff3e0d30e43e4abd5e680cc65
Modified Files
--------------
contrib/pg_standby/pg_standby.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2017-09-25 12:09:54 | pgsql: Support building with Visual Studio 2017 |
Previous Message | Peter Eisentraut | 2017-09-24 12:04:06 | pgsql: Allow ICU to use SortSupport on Windows with UTF-8 |