Re: cvs: pear /DB/DB common.php

From: Date: Sat, 07 Jun 2003 19:48:25 +0000
Subject: Re: cvs: pear /DB/DB common.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10759@lists.php.net to get a copy of this message
This patch is not correct, sorry, one stmt can be executed many times. As well, there are other implications with free's arround many methods. I have to think more on it, I'll continue tomorrow. Tomas V.V.Cox ----- Original Message ----- From: "Tomas V.V.Cox" <cox@php.net> To: <pear-cvs@lists.php.net> Sent: Saturday, June 07, 2003 9:20 PM Subject: [PEAR-CVS] cvs: pear /DB/DB common.php > cox Sat Jun 7 15:20:07 2003 EDT > > Modified files: > /pear/DB/DB common.php > Log: > Fix a mem leak with emulated prepare/execute, bugs #18494 and #20999 > (some driver freeResult() clean-ups to come) > > > Index: pear/DB/DB/common.php > diff -u pear/DB/DB/common.php:1.17 pear/DB/DB/common.php:1.18 > --- pear/DB/DB/common.php:1.17 Sat Jun 7 14:34:49 2003 > +++ pear/DB/DB/common.php Sat Jun 7 15:20:06 2003 > @@ -16,7 +16,7 @@ > // | Author: Stig Bakken <ssb@php.net> | > // +----------------------------------------------------------------------+ > // > -// $Id: common.php,v 1.17 2003/06/07 18:34:49 cox Exp $ > +// $Id: common.php,v 1.18 2003/06/07 19:20:06 cox Exp $ > // > // Base class for DB implementations. > // > @@ -558,7 +558,12 @@ > if (DB::isError($realquery)) { > return $realquery; > } > - $result = $this->simpleQuery($realquery); > + $result = $this->simpleQuery($realquery); > + // Free the internal prepared vars > + unset($this->prepare_tokens[$stmt]); > + unset($this->prepare_types[$stmt]); > + unset($this->prepared_queries[$stmt]); > + > if (DB::isError($result) || $result === DB_OK) { > return $result; > } else { > > > > -- > PEAR CVS Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.cvs (#10759) next »