diff options
author | Nuno Lopes <nlopess@php.net> | 2012-01-01 22:45:58 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2012-01-01 22:45:58 +0000 |
commit | 8b23cae172e265b4cc47cec104cacdce0a7c2dbc (patch) | |
tree | 38cb6beb1c424d0b827f3e4cb1f1585277723b23 /Zend/zend_language_scanner.l | |
parent | 4e198252811dbf16984cf84ee49d5e93ac642f88 (diff) | |
download | php-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.l | 2 |
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); |