From: Bryan Henderson
authorMarc G. Fournier
Tue, 21 Apr 1998 04:00:06 +0000 (04:00 +0000)
committerMarc G. Fournier
Tue, 21 Apr 1998 04:00:06 +0000 (04:00 +0000)
Here's a fix for a tiny memory leak in PQsetdb/PQfinish.

(Analysis of a running program indicates there are several others, but
this is the only obvious one I saw in the code).

src/interfaces/libpq/fe-connect.c

index 8042a043986b8cf649977aff1c98738d9d350d75..136a5fb602b992fad075b2d0c1005e354dcc03ef 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.64 1998/03/26 23:46:14 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.65 1998/04/21 04:00:06 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -726,6 +726,8 @@ freePGconn(PGconn *conn)
        free(conn->dbName);
    if (conn->pguser)
        free(conn->pguser);
+   if (conn->pgpass)
+       free(conn->pgpass);
    if (conn->notifyList)
        DLFreeList(conn->notifyList);
    free(conn);