From: Steph Fox Date: Sat, 21 Jun 2008 20:47:35 +0000 (+0000) Subject: - Kill a couple of double frees and a memleak X-Git-Tag: php-5.3.0alpha1~676 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35e0565a4b6e487c48ad9f060ca06151d4daf657;p=php - Kill a couple of double frees and a memleak @Greg: You may want to run valgrind over the filestat functions before release.. --- diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 026f88fd5d..81d3ec710b 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -685,6 +685,7 @@ notfound: efree(entry); efree(save2); if (IS_EXISTS_CHECK(type)) { + efree(arch); RETURN_TRUE; } goto stat_entry; @@ -724,6 +725,7 @@ notfound: 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 @@ stat_entry: } statme_baby: - efree(arch); if (!phar->is_writeable) { sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode & ~0777); }