From cc242b6afac9f238b30b2d7d66410a3431aa9d78 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 6 Jan 2006 20:34:31 +0000 Subject: [PATCH] - Fix potential crash (const' type is not initialized in case of error) --- ext/phar/phar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 06380d40fd..66ad6773f4 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -452,14 +452,12 @@ static int phar_open_compiled_file(char *alias, int alias_len, zend_bool compres MAKE_STD_ZVAL(halt_constant); if (0 == zend_get_constant("__COMPILER_HALT_OFFSET__", 24, halt_constant TSRMLS_CC)) { - zval_dtor(halt_constant); - FREE_ZVAL(halt_constant); + FREE_ZVAL(halt_constant); php_error_docref(NULL TSRMLS_CC, E_ERROR, "__HALT_COMPILER(); must be declared in a phar"); return FAILURE; } halt_offset = Z_LVAL(*halt_constant); - zval_dtor(halt_constant); - FREE_ZVAL(halt_constant); + zval_ptr_dtor(&halt_constant); fp = php_stream_open_wrapper(fname, "rb", IGNORE_URL|STREAM_MUST_SEEK|REPORT_ERRORS, NULL); -- 2.40.0