Skip to content

Commit 9e038d6

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 af72b08 commit 9e038d6

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
@@ -1448,6 +1448,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
14481448

14491449
sendFailed:
14501450
pqRecycleCmdQueueEntry(conn, entry);
1451+
pqRecycleCmdQueueEntry(conn, entry2);
14511452
/* error message should be set up already */
14521453
return 0;
14531454
}

0 commit comments

Comments
 (0)