diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-06-01 15:39:08 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-06-01 15:39:08 +0000 |
commit | 9a5529f4d188a572b5862439e9a590342c027135 (patch) | |
tree | 531ed4110a7ad0ec01dc2233d2e30d9936b0b3b9 /src/interfaces/libpq/fe-connect.c | |
parent | d95572767e196d92d8bcb609d0da593888d51709 (diff) |
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] memory leak patches in libpq and psql
A couple of small memory leak patches (detected with Purify) primarily
in libpq.
* Fixed (NULL) border problem in psql (run psql, do \m, then select
something from a table...row separators will be nulls)
* Fixed memory leak with the abovementioned border not being freed
properly.
* Fixed memory leak in freePGconn() not freeing conn->port
* Fixed up PQclear() to free parts of PGresult only if these
parts are not null.
* Fixed a decent memory leak that occured after executing every command
in psql. PGresult *results was not freed most of the time.
There is still a leak being detected (2 bytes) in readline functions, but
I think this is old readline library. I will install new one and test it.
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index c19ed020160..4cf8ef2aebd 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.35 1997/05/20 03:38:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.36 1997/06/01 15:38:52 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -588,6 +588,7 @@ freePGconn(PGconn *conn) if (conn->dbName) free(conn->dbName); if (conn->pguser) free(conn->pguser); if (conn->notifyList) DLFreeList(conn->notifyList); + if (conn->port) free(conn->port); free(conn); } |