cvs: php-src /ext/zip/lib zip_free.c zip_set_archive_comment.c
| From: | Nuno Lopes | Date: | Sat, 11 Nov 2006 23:36:52 +0000 |
| Subject: | cvs: php-src /ext/zip/lib zip_free.c zip_set_archive_comment.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41479@lists.php.net to get a copy of this message | ||
nlopess Sat Nov 11 23:36:52 2006 UTC
Modified files:
/php-src/ext/zip/lib zip_set_archive_comment.c zip_free.c
Log:
MFB :fix leak in oo_setArchiveComment.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_set_archive_comment.c?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/zip/lib/zip_set_archive_comment.c
diff -u php-src/ext/zip/lib/zip_set_archive_comment.c:1.1
php-src/ext/zip/lib/zip_set_archive_comment.c:1.2
--- php-src/ext/zip/lib/zip_set_archive_comment.c:1.1 Mon Jul 24 16:58:58 2006
+++ php-src/ext/zip/lib/zip_set_archive_comment.c Sat Nov 11 23:36:52 2006
@@ -60,7 +60,7 @@
else
tmpcom = NULL;
- free(za->ch_comment);
+ if (za->ch_comment) free(za->ch_comment);
za->ch_comment = tmpcom;
za->ch_comment_len = len;
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_free.c?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/zip/lib/zip_free.c
diff -u php-src/ext/zip/lib/zip_free.c:1.1 php-src/ext/zip/lib/zip_free.c:1.2
--- php-src/ext/zip/lib/zip_free.c:1.1 Mon Jul 24 16:58:58 2006
+++ php-src/ext/zip/lib/zip_free.c Sat Nov 11 23:36:52 2006
@@ -59,6 +59,9 @@
if (za->zp)
fclose(za->zp);
+ if (za->ch_comment)
+ free(za->ch_comment);
+
_zip_cdir_free(za->cdir);
if (za->entry) {