summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorTom Lane2015-02-12 00:20:49 +0000
committerTom Lane2015-02-12 00:20:49 +0000
commit4f38a281a3d4a7cbcf9de2f676d44336d57b7717 (patch)
tree6025dc0f47c1cf15492044c495cb21f13bd7aec7 /src/backend
parent58146d35deed3bd3e05ce4b5ba529e4e4a369ddb (diff)
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.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/replication/libpqwalreceiver/libpqwalreceiver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index ddcf6b2940..19dc9efedd 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);