]> granicus.if.org Git - re2c/commitdiff
- Fix memleak (inplace configuration names/values)
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 5 Jun 2006 22:08:41 +0000 (22:08 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 5 Jun 2006 22:08:41 +0000 (22:08 +0000)
re2c/parser.y

index c1dd6622f8455c60f9867a128309b39fdca38e04..59773dbafc34ba345a381aeae53815b6e52767bc 100644 (file)
@@ -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 '/'