From: Marcus Boerger Date: Fri, 26 Jan 2007 19:43:04 +0000 (+0000) Subject: - Fix stream closing X-Git-Tag: RELEASE_1_0_0RC1~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e52a5adc344f206ad058c5d27c59d96ddb34ab10;p=php - Fix stream closing --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 4e980e4836..940b88ace9 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1434,7 +1434,9 @@ static int phar_stream_close(php_stream *stream, int close_handle TSRMLS_DC) /* /* data->fp is the temporary memory stream containing this file's data */ phar_free_entry_data(data TSRMLS_CC); if (--phar->refcount < 0) { - phar_destroy_phar_data(phar TSRMLS_CC); + if (zend_hash_del(&(PHAR_GLOBALS->phar_fname_map), phar->fname, phar->fname_len) != SUCCESS) { + phar_destroy_phar_data(phar TSRMLS_CC); + } } return 0;