zend_compile_file returns a NULL on error, check for that before

calling destroy_op_array unless we like crashes :-)
This commit is contained in:
Shane Caraveo 2001-02-21 20:50:49 +00:00
parent 7139926e84
commit 09c7116f6e

View File

@ -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;
}