Re: Patch to fix memory leak in fetch in Python interface. - Mailing list pgsql-patches

From Stephen Robert Norris
Subject Re: Patch to fix memory leak in fetch in Python interface.
Date
Msg-id 1003359407.31480.6.camel@ws12
Whole thread Raw
In response to Patch to fix memory leak in fetch in Python interface.  (Stephen Robert Norris <srn@commsecure.com.au>)
Responses Re: Patch to fix memory leak in fetch in Python interface.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Patch to fix memory leak in fetch in Python interface.  (Gerhard Häring <haering_python@gmx.de>)
Re: Patch to fix memory leak in fetch in Python interface.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Thu, 2001-10-18 at 08:46, Stephen Robert Norris wrote:
> This stops the interface from leaking the row tuples (and thus the
> results of every fetch).
>
>     Stephen

Of course, I screwed up the patch. This one is actually correct, I
think:

--- /root/pgmodule.c    Thu Oct 18 08:47:02 2001
+++ pgmodule.c    Thu Oct 18 08:47:25 2001
@@ -566,6 +566,7 @@
         }

         PyList_Append(reslist, rowtuple);
+        Py_DECREF(rowtuple);
         self->current_row++;
     }


Attachment

pgsql-patches by date:

Previous
From: Stephen Robert Norris
Date:
Subject: Patch to fix memory leak in fetch in Python interface.
Next
From: Bruce Momjian
Date:
Subject: Re: Patch to fix memory leak in fetch in Python interface.