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); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php