From: Marcus Boerger Date: Wed, 10 Jan 2007 00:07:45 +0000 (+0000) Subject: - Simplify/Add comment X-Git-Tag: RELEASE_1_0_0RC1~325 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=813d4a2451bd76b0909754cece1c29f268dd9560;p=php - Simplify/Add comment --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 3b17d9001c..24b3462474 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -289,19 +289,14 @@ static spl_other_handler phar_spl_foreign_handler = { static void destroy_phar_manifest(void *pDest) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)pDest; + TSRMLS_FETCH(); if (entry->fp) { - TSRMLS_FETCH(); - php_stream_close(entry->fp); } if (entry->temp_file) { - TSRMLS_FETCH(); - php_stream_close(entry->temp_file); } - entry->fp = 0; - entry->temp_file = 0; efree(entry->filename); } /* }}} */ @@ -1479,6 +1474,7 @@ static int phar_stream_close(php_stream *stream, int close_handle TSRMLS_DC) /* php_stream_close(data->fp); data->fp = 0; } else { + /* else transfer ownership back */ data->internal_file->fp = data->fp; } }