cvs: pecl /zip php_zip.c

From: Date: Sun, 12 Nov 2006 00:32:12 +0000
Subject: cvs: pecl /zip php_zip.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-6621@lists.php.net to get a copy of this message
nlopess Sun Nov 12 00:32:12 2006 UTC Modified files: /pecl/zip php_zip.c Log: fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt) http://cvs.php.net/viewvc.cgi/pecl/zip/php_zip.c?r1=1.85&r2=1.86&diff_format=u Index: pecl/zip/php_zip.c diff -u pecl/zip/php_zip.c:1.85 pecl/zip/php_zip.c:1.86 --- pecl/zip/php_zip.c:1.85 Wed Nov 1 22:51:36 2006 +++ pecl/zip/php_zip.c Sun Nov 12 00:32:12 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.c,v 1.85 2006/11/01 22:51:36 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.86 2006/11/12 00:32:12 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -504,7 +504,9 @@ return; } if (intern->za) { - zip_close(intern->za); + if (zip_close(intern->za) != 0) { + _zip_free(intern->za); + } intern->za = NULL; } @@ -2022,7 +2024,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.85 2006/11/01 22:51:36 pajoye Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.86 2006/11/12 00:32:12 nlopess Exp $"); php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@"); php_info_print_table_row(2, "Libzip version", "0.7.1");

« previous php.pecl.cvs (#6621) next »