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:19:45 +0900 |
commit | 9747a9898518080d37fa40e86ea1aa6602061abf (patch) | |
tree | 71e32fb2f8b35a2922898815c99f86c156f49085 /src | |
parent | 39217ce414190c11df02db4f500acbc52bacfb0a (diff) | |
download | postgresql-9747a9898518080d37fa40e86ea1aa6602061abf.tar.gz postgresql-9747a9898518080d37fa40e86ea1aa6602061abf.zip |
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
Diffstat (limited to 'src')
-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 866d4d82eaf..33095304fa7 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -680,6 +680,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); @@ -694,6 +695,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). * @@ -715,6 +718,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, fprintf(stderr, _("%s: unexpected termination of replication stream: %s"), progname, PQresultErrorMessage(res)); + PQclear(res); goto error; } } @@ -925,6 +929,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, PQclear(res); goto error; } + PQclear(res); res = PQgetResult(conn); } still_sending = false; |