mirror of
https://github.com/postgres/postgres.git
synced 2026-03-01 21:01:12 -05:00
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
This commit is contained in:
parent
38803d823c
commit
7cf7dc759c
1 changed files with 5 additions and 0 deletions
|
|
@ -626,6 +626,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||
fprintf(stderr,
|
||||
_("%s: unexpected termination of replication stream: %s"),
|
||||
progname, PQresultErrorMessage(res));
|
||||
PQclear(res);
|
||||
goto error;
|
||||
}
|
||||
PQclear(res);
|
||||
|
|
@ -640,6 +641,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||
}
|
||||
else if (PQresultStatus(res) == PGRES_COMMAND_OK)
|
||||
{
|
||||
PQclear(res);
|
||||
|
||||
/*
|
||||
* End of replication (ie. controlled shut down of the server).
|
||||
*
|
||||
|
|
@ -661,6 +664,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||
fprintf(stderr,
|
||||
_("%s: unexpected termination of replication stream: %s"),
|
||||
progname, PQresultErrorMessage(res));
|
||||
PQclear(res);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
|
@ -871,6 +875,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||
PQclear(res);
|
||||
goto error;
|
||||
}
|
||||
PQclear(res);
|
||||
res = PQgetResult(conn);
|
||||
}
|
||||
still_sending = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue