Skip site navigation (1) Skip section navigation (2)

Re: Patch to fix memory leak in fetch in Python interface.

From: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to fix memory leak in fetch in Python interface.
Date: 2001-10-17 22:56:47
Message-ID: 1003359407.31480.6.camel@ws12 (view raw or flat)
Thread:
Lists: 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++;
 	}
 

In response to

Responses

pgsql-patches by date

Next:From: Marko KreenDate: 2001-10-17 23:27:45
Subject: Re: [PATCHES] Ant configuration
Previous:From: Stephen Robert NorrisDate: 2001-10-17 22:46:27
Subject: Patch to fix memory leak in fetch in Python interface.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group