]> granicus.if.org Git - php/commitdiff
- Fix stream closing
authorMarcus Boerger <helly@php.net>
Fri, 26 Jan 2007 19:43:04 +0000 (19:43 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 26 Jan 2007 19:43:04 +0000 (19:43 +0000)
ext/phar/phar.c

index 4e980e48369ef8259dbeac12e25c1224c7cef102..940b88ace92b76bdd9a9406b7431410a46d25be9 100644 (file)
@@ -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;