Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b526ed

Browse files
committed
Fix new memory leaks in libpq
My oversight in commit9aa491a.Per coverity.
1 parent677271a commit2b526ed

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/interfaces/libpq/fe-exec.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,10 +1299,6 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
12991299
if (!PQsendQueryStart(conn,newQuery))
13001300
return0;
13011301

1302-
entry=pqAllocCmdQueueEntry(conn);
1303-
if (entry==NULL)
1304-
return0;/* error msg already set */
1305-
13061302
/* check the argument */
13071303
if (!query)
13081304
{
@@ -1311,6 +1307,10 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
13111307
return0;
13121308
}
13131309

1310+
entry=pqAllocCmdQueueEntry(conn);
1311+
if (entry==NULL)
1312+
return0;/* error msg already set */
1313+
13141314
/* Send the query message(s) */
13151315
if (conn->pipelineStatus==PQ_PIPELINE_OFF)
13161316
{
@@ -1320,6 +1320,7 @@ PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
13201320
pqPutMsgEnd(conn)<0)
13211321
{
13221322
/* error message should be set up already */
1323+
pqRecycleCmdQueueEntry(conn,entry);
13231324
return0;
13241325
}
13251326

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp