summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-01-06 20:34:31 +0000
committerMarcus Boerger <helly@php.net>2006-01-06 20:34:31 +0000
commitcc242b6afac9f238b30b2d7d66410a3431aa9d78 (patch)
tree47e6d4b825e2cc38fb83240475000b86d9bf090f /ext/phar
parentc5926d1efa9ea4429f3ef3e9c0c4c586102cd9f5 (diff)
downloadphp-git-cc242b6afac9f238b30b2d7d66410a3431aa9d78.tar.gz
- Fix potential crash (const' type is not initialized in case of error)
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/phar.c6
1 files 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);