From: helly Date: Mon, 5 Jun 2006 22:08:41 +0000 (+0000) Subject: - Fix memleak (inplace configuration names/values) X-Git-Tag: 0.13.6~277 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d188e5b3157296ae7fcdf4383daadf2f80d70b1;p=re2c - Fix memleak (inplace configuration names/values) --- 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 '/'