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) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to