From 0d188e5b3157296ae7fcdf4383daadf2f80d70b1 Mon Sep 17 00:00:00 2001 From: helly Date: Mon, 5 Jun 2006 22:08:41 +0000 Subject: [PATCH] - Fix memleak (inplace configuration names/values) --- re2c/parser.y | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/re2c/parser.y b/re2c/parser.y index c1dd6622..59773dba 100644 --- a/re2c/parser.y +++ b/re2c/parser.y @@ -93,9 +93,16 @@ decl : ID '=' expr ';' in->fatal("sym already defined"); $1->re = $3; } | CONFIG '=' VALUE ';' - { in->config(*$1, *$3); } + { + in->config(*$1, *$3); + delete $1; + delete $3; + } | CONFIG '=' NUMBER ';' - { in->config(*$1, $3); } + { + in->config(*$1, $3); + delete $1; + } ; decl : ID '=' expr '/' -- 2.40.0