Content-Length: 254177 | pFad | http://github.com/postgrespro/postgres/commit/4f38a281a3d4a7cbcf9de2f676d44336d57b7717

98 Fix missing PQclear() in libpqrcv_endstreaming(). · postgrespro/postgres@4f38a28 · GitHub
Skip to content

Commit 4f38a28

Browse files
committed
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.
1 parent 58146d3 commit 4f38a28

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ libpqrcv_endstreaming(TimeLineID *next_tli)
262262
ereport(ERROR,
263263
(errmsg("error reading result of streaming command: %s",
264264
PQerrorMessage(streamConn))));
265+
PQclear(res);
265266

266267
/* Verify that there are no more results */
267268
res = PQgetResult(streamConn);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/4f38a281a3d4a7cbcf9de2f676d44336d57b7717

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy