cvs: php-src(PHP_5_3) /ext/phar util.c

From: Date: Sun, 15 Jun 2008 22:51:46 +0000
Subject: cvs: php-src(PHP_5_3) /ext/phar util.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-50446@lists.php.net to get a copy of this message
cellog Sun Jun 15 22:51:46 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar util.c Log: fix memleak http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.9&r2=1.55.2.10&diff_format=u Index: php-src/ext/phar/util.c diff -u php-src/ext/phar/util.c:1.55.2.9 php-src/ext/phar/util.c:1.55.2.10 --- php-src/ext/phar/util.c:1.55.2.9 Sun Jun 15 18:15:48 2008 +++ php-src/ext/phar/util.c Sun Jun 15 22:51:46 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: util.c,v 1.55.2.9 2008/06/15 18:15:48 cellog Exp $ */ +/* $Id: util.c,v 1.55.2.10 2008/06/15 22:51:46 cellog Exp $ */ #include "phar_internal.h" #ifdef PHAR_HAVE_OPENSSL @@ -702,6 +702,8 @@ } if (FAILURE == zend_hash_add(&phar->manifest, etemp.filename, path_len, (void*)&etemp, sizeof(phar_entry_info), (void **) &entry)) { efree(ret); + php_stream_close(etemp.fp); + efree(etemp.filename); if (error) { spprintf(error, 0, "phar error: unable to add new entry \"%s\" to phar \"%s\"", etemp.filename, phar->fname); }

« previous php.cvs (#50446) next »