1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00
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.
This commit is contained in:
Marc G. Fournier
1997-06-01 15:39:08 +00:00
parent d95572767e
commit 9a5529f4d1
3 changed files with 23 additions and 18 deletions

View File

@ -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);
}
}