From a7d57a48145d0fb88c7e3fe85688b0932b91dde1 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 9 Jan 2007 23:23:12 +0000 Subject: [PATCH] - Fix write support & simplify --- ext/phar/phar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index fb45afcb2b..a92c9b8d59 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -225,7 +225,7 @@ static void phar_destroy_phar_data(phar_archive_data *data TSRMLS_DC) /* {{{ */ if (data->fp) { php_stream_close(data->fp); } - data->fp = 0; + efree(data); } /* }}}*/ @@ -1923,11 +1923,7 @@ static int phar_flush(phar_entry_data *data TSRMLS_DC) /* {{{ */ /* remove this from the new phar */ continue; } - if (entry->flags & PHAR_ENT_MODIFIED) { - if (!entry->temp_file) { - /* nothing to do here */ - continue; - } + if ((entry->flags & PHAR_ENT_MODIFIED) && entry->temp_file) { php_stream_rewind(entry->temp_file); file = entry->temp_file; } else { -- 2.50.1