From 32f9bc6f7d0874aee80a9118dd9de4ce10abd5d5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 13 Jul 2005 15:26:25 +0000 Subject: [PATCH] Fix libpq memory leak during PQreset() --- closePGconn() was not freeing all transient state of the PGconn object. --- src/interfaces/libpq/fe-connect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.5