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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to fix memory leak in fetch in Python interface.
Date: 2001-10-18 15:24:33
Message-ID: 200110181524.f9IFOXZ11647@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

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



Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> This stops the interface from leaking the row tuples (and thus the
> results of every fetch).
> 
> 	Stephen
> 
> --- pgmodule.c	Wed Oct 17 17:07:05 2001
> +++ pgmodule.c.orig	Thu Oct 18 08:39:52 2001
> @@ -561,11 +561,11 @@
>  			}
>  			else
>  				str = PyString_FromString(PQgetvalue(self->last_result,
> self->current_row, j));
> -			PyTuple_SET_ITEM(rowtuple, j, str);
> +			Py_DECREF(str);
> +			PyTuple_SET_ITEM(rowtuple, j, Py_None);
>  		}
>  
>  		PyList_Append(reslist, rowtuple);
> -		Py_DECREF(rowtuple);
>  		self->current_row++;
>  	}
> 
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-10-18 16:24:17
Subject: Re: Patch to fix memory leak in fetch in Python interface.
Previous:From: Barry LindDate: 2001-10-18 02:37:27
Subject: Re: [PATCHES] Ant configuration

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