- Fix stream closing

This commit is contained in:
Marcus Boerger 2007-01-26 19:43:04 +00:00
parent dd5dff82de
commit e52a5adc34

View 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;