mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +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:
parent
9bc1b439ef
commit
e158bbb6e9
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user