From 529ac539d061b359ad6e28fb8c6baa7841a8c8ec Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 18 Jul 2008 09:35:51 +0000 Subject: [PATCH] Fixed access to freed memory --- ext/phar/stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/phar/stream.c b/ext/phar/stream.c index a1c30b22df..f70af7143e 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -347,10 +347,11 @@ phar_stub: static int phar_stream_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */ { phar_entry_info *entry = ((phar_entry_data *)stream->abstract)->internal_file; + int is_temp_dir = entry->is_temp_dir; phar_entry_delref((phar_entry_data *)stream->abstract TSRMLS_CC); - if (entry->is_temp_dir) { + if (is_temp_dir) { /* phar archive stub, free it */ efree(entry); } -- 2.50.1