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/bin/psql/psql.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/bin/psql/psql.c')
-rw-r--r-- | src/bin/psql/psql.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index e91bcd26540..42030aae083 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.66 1997/05/24 14:38:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.67 1997/06/01 15:38:42 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -612,6 +612,7 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query, notify->relname, notify->be_pid); free(notify); } + PQclear(results); } } |