cvs: php-src /ext/zip php_zip.c
| From: | Nuno Lopes | Date: | Sun, 12 Nov 2006 00:31:37 +0000 |
| Subject: | cvs: php-src /ext/zip php_zip.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41483@lists.php.net to get a copy of this message | ||
nlopess Sun Nov 12 00:31:37 2006 UTC
Modified files:
/php-src/ext/zip php_zip.c
Log:
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);
+ }
intern->za = NULL;
}
@@ -2057,7 +2059,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.30 2006/11/11
23:43:40 nlopess Exp $");
+ php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.31 2006/11/12
00:31:37 nlopess Exp $");
php_info_print_table_row(2, "Zip version", "2.0.0");
php_info_print_table_row(2, "Libzip version", "0.7.1");