diff options
author | Fujii Masao <fujii@postgresql.org> | 2014-08-02 15:18:09 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2014-08-02 15:18:09 +0900 |
commit | b819dd7cb55aed1d607cef36b0ecd1a0642872b2 (patch) | |
tree | 845b0497e68fae027af97eba5375ab15c73a1330 /src/bin/pg_basebackup/receivelog.c | |
parent | 694fd33e23170f64d30ef35e647b824d34938e09 (diff) | |
download | postgresql-b819dd7cb55aed1d607cef36b0ecd1a0642872b2.tar.gz postgresql-b819dd7cb55aed1d607cef36b0ecd1a0642872b2.zip |
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
Diffstat (limited to 'src/bin/pg_basebackup/receivelog.c')
-rw-r--r-- | src/bin/pg_basebackup/receivelog.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index 99d875be9c5..a260881517d 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -628,6 +628,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, fprintf(stderr, _("%s: unexpected termination of replication stream: %s"), progname, PQresultErrorMessage(res)); + PQclear(res); goto error; } PQclear(res); @@ -642,6 +643,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, } else if (PQresultStatus(res) == PGRES_COMMAND_OK) { + PQclear(res); + /* * End of replication (ie. controlled shut down of the server). * @@ -663,6 +666,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, fprintf(stderr, _("%s: unexpected termination of replication stream: %s"), progname, PQresultErrorMessage(res)); + PQclear(res); goto error; } } @@ -839,6 +843,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, PQclear(res); goto error; } + PQclear(res); res = PQgetResult(conn); } still_sending = false; |