sfox Sat Jun 21 21:37:39 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/phar util.c
Log:
- Don't free stuff you still need
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.18&r2=1.55.2.19&diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.18 php-src/ext/phar/util.c:1.55.2.19
--- php-src/ext/phar/util.c:1.55.2.18 Sat Jun 21 19:15:46 2008
+++ php-src/ext/phar/util.c Sat Jun 21 21:37:39 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: util.c,v 1.55.2.18 2008/06/21 19:15:46 sfox Exp $ */
+/* $Id: util.c,v 1.55.2.19 2008/06/21 21:37:39 sfox Exp $ */
#include "phar_internal.h"
@@ -746,12 +746,12 @@
etemp.tar_type = TAR_FILE;
}
if (FAILURE == zend_hash_add(&phar->manifest, etemp.filename, path_len,
(void*)&etemp, sizeof(phar_entry_info), (void **) &entry)) {
- efree(ret);
php_stream_close(etemp.fp);
- efree(etemp.filename);
if (error) {
spprintf(error, 0, "phar error: unable to add new entry
\"%s\" to phar \"%s\"", etemp.filename, phar->fname);
}
+ efree(ret);
+ efree(etemp.filename);
return NULL;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php