nlopess Sun Nov 12 00:41:16 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/zip zip_stream.c
Log:
fix leak in oo_stream.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/zip/zip_stream.c
diff -u php-src/ext/zip/zip_stream.c:1.1.2.1
php-src/ext/zip/zip_stream.c:1.1.2.2
--- php-src/ext/zip/zip_stream.c:1.1.2.1 Thu Jul 27 00:36:55 2006
+++ php-src/ext/zip/zip_stream.c Sun Nov 12 00:41:16 2006
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.1.2.1 2006/07/27 00:36:55 iliaa Exp $ */
+/* $Id: zip_stream.c,v 1.1.2.2 2006/11/12 00:41:16 nlopess Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -60,9 +60,15 @@
static int php_zip_ops_close(php_stream *stream, int close_handle TSRMLS_DC)
{
STREAM_DATA_FROM_STREAM();
- if (close_handle && self->za) {
- zip_close(self->za);
- self->za = NULL;
+ if (close_handle) {
+ if (self->za) {
+ zip_close(self->za);
+ self->za = NULL;
+ }
+ if (self->zf) {
+ zip_fclose(self->zf);
+ self->zf = NULL;
+ }
}
efree(self);
stream->abstract = NULL;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php