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-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=77b231de231cba78e866478396d9916d7b954d67;p=users%2Fbernd%2Fpostgres.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 7a82d903e4..312d893092 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -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;