From: Ilia Alshanetsky Date: Sat, 29 Nov 2003 18:22:44 +0000 (+0000) Subject: Fixed a memory leak when tokenizing scripts with heredoc. X-Git-Tag: php-5.0.0b3RC1~517 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e195d1040efdc7d14a94d7be9b01c65c8d24b61;p=php Fixed a memory leak when tokenizing scripts with heredoc. --- diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 3414543d8f..5c7346c4ba 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -369,6 +369,9 @@ static void tokenize(zval *return_value TSRMLS_DC) if (destroy && Z_TYPE(token) != IS_NULL) { zval_dtor(&token); } + if (token_type == T_END_HEREDOC) { + efree(Z_STRVAL(token)); + } ZVAL_NULL(&token); } }