pg_basebackup: Add missing PQclear in error path

This adds a missing PQclear in the error path of StreamLogicalLog, a
fix in the same vein as e889422d98e with an equivalent low impact.

Author: Steven Niu <niushiji@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/c4b1c627-a3e4-4347-a670-1e28a43ce0eb@gmail.com
This commit is contained in:
Daniel Gustafsson 2025-03-25 17:24:23 +01:00
parent ef7a5af77d
commit a19db08274

View File

@ -633,6 +633,7 @@ StreamLogicalLog(void)
{
pg_log_error("unexpected termination of replication stream: %s",
PQresultErrorMessage(res));
PQclear(res);
goto error;
}
PQclear(res);