This is an automated email from the ASF dual-hosted git repository. reshke pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit df6883fcac3622b45983d96b0d3128122c18aa53 Author: Alvaro Herrera <[email protected]> AuthorDate: Wed Jul 13 12:10:03 2022 +0200 Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. --- src/interfaces/libpq/fe-exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index b2c7727f68d..ea3a78420ca 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -1482,6 +1482,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery) sendFailed: pqRecycleCmdQueueEntry(conn, entry); + pqRecycleCmdQueueEntry(conn, entry2); /* error message should be set up already */ return 0; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
