mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
This commit is contained in:
parent
39217ce414
commit
9747a98985
@ -680,6 +680,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);
|
||||
@ -694,6 +695,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).
|
||||
*
|
||||
@ -715,6 +718,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
||||
fprintf(stderr,
|
||||
_("%s: unexpected termination of replication stream: %s"),
|
||||
progname, PQresultErrorMessage(res));
|
||||
PQclear(res);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -925,6 +929,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
||||
PQclear(res);
|
||||
goto error;
|
||||
}
|
||||
PQclear(res);
|
||||
res = PQgetResult(conn);
|
||||
}
|
||||
still_sending = false;
|
||||
|
Loading…
Reference in New Issue
Block a user