mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Plug memory leak
Commit 054325c5ee
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.
This commit is contained in:
parent
559ec79e32
commit
e690930704
@ -1546,6 +1546,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user