postgres.git / summary / log / commit / refs

commit    32f9bc6f7d0874aee80a9118dd9de4ce10abd5d5
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Jul 13 15:26:25 2005 +0000
First released in: 8.1.0, 7.3.11, 7.4.9, 8.0.4

    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; [parent: d53f22de868b]