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

Commitf2f7107

Browse files
committed
Must free the pgParameterStatus chain in freePGconn(). My fault,
well spotted by Neil Conway.
1 parent0a40486 commitf2f7107

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.262 2003/10/02 19:52:44 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.263 2003/10/18 05:02:06 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2003,8 +2003,11 @@ makeEmptyPGconn(void)
20032003
staticvoid
20042004
freePGconn(PGconn*conn)
20052005
{
2006+
pgParameterStatus*pstatus;
2007+
20062008
if (!conn)
20072009
return;
2010+
20082011
pqClearAsyncResult(conn);/* deallocate result and curTuple */
20092012
if (conn->sock >=0)
20102013
{
@@ -2037,6 +2040,14 @@ freePGconn(PGconn *conn)
20372040
if (conn->notifyList)
20382041
DLFreeList(conn->notifyList);
20392042
freeaddrinfo_all(conn->addrlist_family,conn->addrlist);
2043+
pstatus=conn->pstatus;
2044+
while (pstatus!=NULL)
2045+
{
2046+
pgParameterStatus*prev=pstatus;
2047+
2048+
pstatus=pstatus->next;
2049+
free(prev);
2050+
}
20402051
if (conn->lobjfuncs)
20412052
free(conn->lobjfuncs);
20422053
if (conn->inBuffer)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp