sfox Sat Jun 21 20:47:36 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/phar func_interceptors.c
Log:
- Kill a couple of double frees and a memleak
@Greg: You may want to run valgrind over the filestat functions before
release..
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.20.2.6&r2=1.20.2.7&diff_format=u
Index: php-src/ext/phar/func_interceptors.c
diff -u php-src/ext/phar/func_interceptors.c:1.20.2.6
php-src/ext/phar/func_interceptors.c:1.20.2.7
--- php-src/ext/phar/func_interceptors.c:1.20.2.6 Fri Jun 20 05:42:58 2008
+++ php-src/ext/phar/func_interceptors.c Sat Jun 21 20:47:35 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: func_interceptors.c,v 1.20.2.6 2008/06/20 05:42:58 cellog Exp $ */
+/* $Id: func_interceptors.c,v 1.20.2.7 2008/06/21 20:47:35 sfox Exp $ */
#include "phar_internal.h"
@@ -685,6 +685,7 @@
efree(entry);
efree(save2);
if (IS_EXISTS_CHECK(type)) {
+ efree(arch);
RETURN_TRUE;
}
goto stat_entry;
@@ -724,6 +725,7 @@
RETURN_FALSE;
}
stat_entry:
+ efree(arch);
if (!data->is_dir) {
sb.st_size = data->uncompressed_filesize;
sb.st_mode = data->flags & PHAR_ENT_PERM_MASK;
@@ -762,7 +764,6 @@
}
statme_baby:
- efree(arch);
if (!phar->is_writeable) {
sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode
& ~0777);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php