From 4446cfa524cf06e84add450214f64b2de6e199c3 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Thu, 17 Jun 2021 15:59:59 -0400 Subject: sv: fix a few struct and enum memory leaks --- frontends/verilog/verilog_parser.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'frontends/verilog/verilog_parser.y') diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 120a8bca3..9558b0e87 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -1711,10 +1711,12 @@ member_type_token: delete astbuf1; astbuf1 = template_node; } - | struct_union { + | { + delete astbuf1; + } struct_union { // stash state on ast_stack ast_stack.push_back(astbuf2); - astbuf2 = $1; + astbuf2 = $2; } struct_body { astbuf1 = astbuf2; // recover state -- cgit v1.2.3