From: Tom Lane Date: Wed, 13 Jul 2005 15:26:25 +0000 (+0000) Subject: Fix libpq memory leak during PQreset() --- closePGconn() was not X-Git-Tag: REL7_3_11~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32f9bc6f7d0874aee80a9118dd9de4ce10abd5d5;p=thirdparty%2Fpostgresql.git Fix libpq memory leak during PQreset() --- closePGconn() was not freeing all transient state of the PGconn object. --- diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 6a0170807f0..4463db5c226 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.213.2.3 2003/10/31 18:14:11 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.213.2.4 2005/07/13 15:26:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1994,6 +1994,9 @@ closePGconn(PGconn *conn) * absent */ conn->asyncStatus = PGASYNC_IDLE; pqClearAsyncResult(conn); /* deallocate result and curTuple */ + if (conn->notifyList) + DLFreeList(conn->notifyList); + conn->notifyList = NULL; if (conn->lobjfuncs) free(conn->lobjfuncs); conn->lobjfuncs = NULL;