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

index 3414543d8f5956c1e4d1693145f58f2ecbd8d34c..5c7346c4ba0ecc2c73029be404b91f924bccb028 100644 (file)
@@ -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);
        }
 }