Commit 9e038d69 authored by Alvaro Herrera's avatar Alvaro Herrera

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.
parent af72b088
...@@ -1448,6 +1448,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery) ...@@ -1448,6 +1448,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
sendFailed: sendFailed:
pqRecycleCmdQueueEntry(conn, entry); pqRecycleCmdQueueEntry(conn, entry);
pqRecycleCmdQueueEntry(conn, entry2);
/* error message should be set up already */ /* error message should be set up already */
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment