Content-Length: 296784 | pFad | http://github.com/postgrespro/postgres/commit/b819dd7cb55aed1d607cef36b0ecd1a0642872b2

A5 Add missing PQclear() calls into pg_receivexlog. · postgrespro/postgres@b819dd7 · GitHub
Skip to content

Commit b819dd7

Browse files
committed
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
1 parent 694fd33 commit b819dd7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pg_basebackup/receivelog.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
628628
fprintf(stderr,
629629
_("%s: unexpected termination of replication stream: %s"),
630630
progname, PQresultErrorMessage(res));
631+
PQclear(res);
631632
goto error;
632633
}
633634
PQclear(res);
@@ -642,6 +643,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
642643
}
643644
else if (PQresultStatus(res) == PGRES_COMMAND_OK)
644645
{
646+
PQclear(res);
647+
645648
/*
646649
* End of replication (ie. controlled shut down of the server).
647650
*
@@ -663,6 +666,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
663666
fprintf(stderr,
664667
_("%s: unexpected termination of replication stream: %s"),
665668
progname, PQresultErrorMessage(res));
669+
PQclear(res);
666670
goto error;
667671
}
668672
}
@@ -839,6 +843,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
839843
PQclear(res);
840844
goto error;
841845
}
846+
PQclear(res);
842847
res = PQgetResult(conn);
843848
}
844849
still_sending = false;

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/b819dd7cb55aed1d607cef36b0ecd1a0642872b2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy