]> granicus.if.org Git - postgresql/commitdiff
Fix libpq memory leak during PQreset() --- closePGconn() was not
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Jul 2005 15:26:25 +0000 (15:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Jul 2005 15:26:25 +0000 (15:26 +0000)
freeing all transient state of the PGconn object.

src/interfaces/libpq/fe-connect.c

index 6a0170807f0138256bc02532eed35681da05d9b2..4463db5c22656cc1fe9018da173a5eea434d45af 100644 (file)
@@ -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;