projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58146d3
)
Fix missing PQclear() in libpqrcv_endstreaming().
author
Tom Lane
Thu, 12 Feb 2015 00:20:49 +0000
(19:20 -0500)
committer
Tom Lane
Thu, 12 Feb 2015 00:20:49 +0000
(19:20 -0500)
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.
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index ddcf6b294032b41271102ed112fd78169b418783..19dc9efedd46d55bc5888e59c948fa7a30d8f034 100644
(file)
--- 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);