Re: [PATCHES] [HACKERS] Patch for psql.c - Mailing list pgsql-hackers

From Igor
Subject Re: [PATCHES] [HACKERS] Patch for psql.c
Date
Msg-id ceaf503b0d7aed69f00ee89e06ab5569
Whole thread Raw
List pgsql-hackers
Well...I put these PQclear's in because there were memory leaks in that
area. If you put it outside, of the case statement, you start clearing
already freed tuples causing a mess (Marc.. that was the reason why
regression screwed up on boolean). Now, there are a few more memory leaks
(particularly with PGsettings *settings variable) but it doesn't leak much
and will be left alone until 6.2 probably.
I guess if you do if(results) PQclear (results)...oh well...There are no
memory leaks from PQexec anymore so might just as well leave it alone for
now.

=+=------------------------/\---------------------------------=+=
       Igor Natanzon      |**|   E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=

On Mon, 2 Jun 1997, Tymm Twillman wrote:

> Gets rid of memory leaks that occur during regression tests (well, except
> for a leak in SGI's NIS handling stuff :) )...
>
> If someone would look over this and verify it; I want to be sure that
> after a PQexec, no matter what the result (barring NULL), the result
> should be cleared;  I pulled individual PQclears out of a case statement
> and dropped them at the end (lines 579-595) so that the PQclear will be
> hit no matter which case is hit.  Still getting acquainted :)
>
> -Tymm
>

------------------------------

End of hackers-digest V1 #373
*****************************

pgsql-hackers by date:

Previous
From: Keith Parks
Date:
Subject: [HACKERS] Destroying databases.
Next
From: "James A. Hillyerd"
Date:
Subject: Re: [PATCHES] [HACKERS] Patch for psql.c