git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f161802)
Plug memory leak
2022年7月13日 10:10:03 +0000 (12:10 +0200)
2022年7月13日 10:58:56 +0000 (12:58 +0200)
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.


diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index e20d6177fef53abe4d31efad440230593bf1991b..a36f5eb310d86abc6587660154d7ce6055da867b 100644 (file)
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -1542,6 +1542,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;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /