Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+1
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)