diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-11 19:20:49 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-11 19:20:49 -0500 |
commit | 4f38a281a3d4a7cbcf9de2f676d44336d57b7717 (patch) | |
tree | 6025dc0f47c1cf15492044c495cb21f13bd7aec7 | |
parent | 58146d35deed3bd3e05ce4b5ba529e4e4a369ddb (diff) | |
download | postgresql-4f38a281a3d4a7cbcf9de2f676d44336d57b7717.tar.gz postgresql-4f38a281a3d4a7cbcf9de2f676d44336d57b7717.zip |
Fix missing PQclear() in libpqrcv_endstreaming().
This omission leaked one PGresult per WAL streaming cycle, which possibly
would never be enough to notice in the real world, but it's still a leak.
Per Coverity. Back-patch to 9.3 where the error was introduced.
-rw-r--r-- | src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index ddcf6b29403..19dc9efedd4 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -262,6 +262,7 @@ libpqrcv_endstreaming(TimeLineID *next_tli) ereport(ERROR, (errmsg("error reading result of streaming command: %s", PQerrorMessage(streamConn)))); + PQclear(res); /* Verify that there are no more results */ res = PQgetResult(streamConn); |