From: Ilia Alshanetsky Date: Sat, 29 Nov 2003 18:22:46 +0000 (+0000) Subject: MFH: Fixed a memory leak when tokenizing scripts with heredoc. X-Git-Tag: php-4.3.5RC1~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee1077aad030867fe04deef40e12591820d044a5;p=php MFH: Fixed a memory leak when tokenizing scripts with heredoc. --- diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 1ad86920d6..463aedd3f5 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -354,6 +354,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); } }