pgsql: Fix memory and file descriptor leaks in pg_receivexlog/pg_baseba

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix memory and file descriptor leaks in pg_receivexlog/pg_baseba
Date: 2012-07-31 15:06:04
Message-ID: E1SwE1M-0004lJ-LX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix memory and file descriptor leaks in pg_receivexlog/pg_basebackup

When the internal loop mode was added, freeing memory and closing
filedescriptors before returning became important, and a few cases
in the code missed that.

This is a backpatch of commit 058a050e to the 9.2 branch, which seems to
have been neglected (in error, because the bugs it fixes were introduced
in commit 16282ae6 which is present in both master and 9.2).

Fujii Masao

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/776bdc4c5c019a9556a6622a01a406c6c0fec4c9

Modified Files
--------------
src/bin/pg_basebackup/receivelog.c | 58 ++++++++++++++++++++++++------------
src/bin/pg_basebackup/streamutil.c | 16 +++++++++-
2 files changed, 54 insertions(+), 20 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-07-31 18:38:02 pgsql: Fix syslogger so that log_truncate_on_rotation works in the firs
Previous Message Bruce Momjian 2012-07-30 14:16:14 pgsql: Now that the diskchecker.pl author has updated the download link