Re: cvs: php-src /ext/pgsql pgsql.c

From: Date: Fri, 06 May 2005 00:17:50 +0000
Subject: Re: cvs: php-src /ext/pgsql pgsql.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-31736@lists.php.net to get a copy of this message
     MFH? (to both PHP_4_3 and PHP_5_0)
     --Jani
On Tue, 3 May 2005, Ilia Alshanetsky wrote:
iliaa Tue May 3 18:50:02 2005 EDT Modified files: /php-src/ext/pgsql pgsql.c Log: Prevent double free. http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.324&r2=1.325&ty=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.324 php-src/ext/pgsql/pgsql.c:1.325 --- php-src/ext/pgsql/pgsql.c:1.324 Wed Apr 13 18:11:35 2005 +++ php-src/ext/pgsql/pgsql.c Tue May 3 18:50:00 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.324 2005/04/13 22:11:35 tony2001 Exp $ */ +/* $Id: pgsql.c,v 1.325 2005/05/03 22:50:00 iliaa Exp $ */ #include <stdlib.h> @@ -356,8 +356,11 @@ static void _php_pgsql_notice_ptr_dtor(void **ptr) { php_pgsql_notice *notice = (php_pgsql_notice *)*ptr; - efree(notice->message); - efree(notice); + if (notice) { + efree(notice->message); + efree(notice); + notice = NULL; + } } /* }}} */
-- Donate @ http://pecl.php.net/wishlist.php/sniper

« previous php.cvs (#31736) next »