mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user