]> granicus.if.org Git - php/commitdiff
MFH: Fixed a memory leak when tokenizing scripts with heredoc.
authorIlia Alshanetsky <iliaa@php.net>
Sat, 29 Nov 2003 18:22:46 +0000 (18:22 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 29 Nov 2003 18:22:46 +0000 (18:22 +0000)
ext/tokenizer/tokenizer.c

index 1ad86920d661720539521698224396db11f7266d..463aedd3f546fb36bca6f0777a68a25a7d26ed16 100644 (file)
@@ -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);
        }
 }