Re: cvs: php-src /ext/zip php_zip.c
| From: | Pierre | Date: | Sun, 12 Nov 2006 00:36:32 +0000 |
| Subject: | Re: cvs: php-src /ext/zip php_zip.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-41484@lists.php.net to get a copy of this message | ||
Hello,
On 11/12/06, Nuno Lopes <nlopess@php.net> wrote:
It sounds wrong. _zip_free is a private function and is used in zip_close. Can you do it there instead? itself.oo_delete.phpt works here, which error do you have? --Pierrenlopess Sun Nov 12 00:31:37 2006 UTCModified files:/php-src/ext/zip php_zip.cLog: MFB: fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt) http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.30&r2=1.31&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.30 php-src/ext/zip/php_zip.c:1.31--- php-src/ext/zip/php_zip.c:1.30 Sat Nov 11 23:43:40 2006+++ php-src/ext/zip/php_zip.c Sun Nov 12 00:31:37 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.c,v 1.30 2006/11/11 23:43:40 nlopess Exp $ */ +/* $Id: php_zip.c,v 1.31 2006/11/12 00:31:37 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -470,7 +470,9 @@return; } if (intern->za) { - zip_close(intern->za); + if (zip_close(intern->za) != 0) { + _zip_free(intern->za); + }