summaryrefslogtreecommitdiff
path: root/Zend/zend_language_scanner.l
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2012-01-01 22:45:58 +0000
committerNuno Lopes <nlopess@php.net>2012-01-01 22:45:58 +0000
commit8b23cae172e265b4cc47cec104cacdce0a7c2dbc (patch)
tree38cb6beb1c424d0b827f3e4cb1f1585277723b23 /Zend/zend_language_scanner.l
parent4e198252811dbf16984cf84ee49d5e93ac642f88 (diff)
downloadphp-git-8b23cae172e265b4cc47cec104cacdce0a7c2dbc.tar.gz
fix memory leak in compile_string when there's a parse error (used e.g. in eval or assert)
Diffstat (limited to 'Zend/zend_language_scanner.l')
-rw-r--r--Zend/zend_language_scanner.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 629168f813..7668798297 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -756,6 +756,8 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
if (compiler_result==1) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
+ destroy_op_array(op_array TSRMLS_CC);
+ efree(op_array);
retval = NULL;
} else {
zend_do_return(NULL, 0 TSRMLS_CC);