From a19db082749662a933d0bf72722982b1ee2c4725 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Tue, 25 Mar 2025 17:24:23 +0100 Subject: [PATCH] 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 Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/c4b1c627-a3e4-4347-a670-1e28a43ce0eb@gmail.com --- src/bin/pg_basebackup/pg_recvlogical.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index a3447753119..e6158251ec1 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -633,6 +633,7 @@ StreamLogicalLog(void) { pg_log_error("unexpected termination of replication stream: %s", PQresultErrorMessage(res)); + PQclear(res); goto error; } PQclear(res); -- 2.39.5