Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0ac1fed

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 e44735c commit 0ac1fed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ libpqrcv_endstreaming(TimeLineID *next_tli)
252252
ereport(ERROR,
253253
(errmsg("error reading result of streaming command: %s",
254254
PQerrorMessage(streamConn))));
255+
PQclear(res);
255256

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

0 commit comments

Comments
 (0)