Skip to content

Commit e1df03b

Browse files
committed
Plug memory leak
Commit 054325c 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.
1 parent f161802 commit e1df03b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
15421542

15431543
sendFailed:
15441544
pqRecycleCmdQueueEntry(conn, entry);
1545+
pqRecycleCmdQueueEntry(conn, entry2);
15451546
/* error message should be set up already */
15461547
return 0;
15471548
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy