mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Free PQresult on error in pg_receivexlog.
The leak is fairly small and rare, but a leak nevertheless. Per Coverity report. Backpatch to 9.2, where pg_receivexlog was added. pg_basebackup shares the code, but it always exits on error, so there is no real leak.
This commit is contained in:
@ -612,6 +612,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: unexpected termination of replication stream: %s"),
|
_("%s: unexpected termination of replication stream: %s"),
|
||||||
progname, PQresultErrorMessage(res));
|
progname, PQresultErrorMessage(res));
|
||||||
|
PQclear(res);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
Reference in New Issue
Block a user