From: Shane Caraveo Date: Wed, 21 Feb 2001 20:50:49 +0000 (+0000) Subject: zend_compile_file returns a NULL on error, check for that before X-Git-Tag: php-4.0.5RC1~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09c7116f6ef6bf4b4031395dbbed42f6d67e2aa4;p=php zend_compile_file returns a NULL on error, check for that before calling destroy_op_array unless we like crashes :-) --- diff --git a/main/main.c b/main/main.c index f089853461..b926d5661a 100644 --- a/main/main.c +++ b/main/main.c @@ -1263,7 +1263,8 @@ PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC) op_array = zend_compile_file(file, ZEND_INCLUDE CLS_CC); retval = (op_array?SUCCESS:FAILURE); - destroy_op_array(op_array); + /* SMC op_array may be NULL */ + if (op_array != NULL) destroy_op_array(op_array); return retval; }