diff options
| author | Tom Lane | 2015-02-12 00:20:49 +0000 |
|---|---|---|
| committer | Tom Lane | 2015-02-12 00:20:49 +0000 |
| commit | 4f38a281a3d4a7cbcf9de2f676d44336d57b7717 (patch) | |
| tree | 6025dc0f47c1cf15492044c495cb21f13bd7aec7 /src/backend/replication | |
| parent | 58146d35deed3bd3e05ce4b5ba529e4e4a369ddb (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/replication')
| -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); |
