aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/verilog
diff options
context:
space:
mode:
authorZachary Snow <zach@zachjs.com>2021-06-17 15:59:59 -0400
committerZachary Snow <zachary.j.snow@gmail.com>2021-07-06 12:15:08 -0400
commit4446cfa524cf06e84add450214f64b2de6e199c3 (patch)
tree629b86e46d14930d22eb40cd2dbef804ac1038c3 /frontends/verilog
parent2b8f1633ce7800b4f0315f0206fd0bf9fba5237c (diff)
downloadyosys-4446cfa524cf06e84add450214f64b2de6e199c3.tar.gz
yosys-4446cfa524cf06e84add450214f64b2de6e199c3.tar.bz2
yosys-4446cfa524cf06e84add450214f64b2de6e199c3.zip
sv: fix a few struct and enum memory leaks
Diffstat (limited to 'frontends/verilog')
-rw-r--r--frontends/verilog/verilog_parser.y6
1 files changed, 4 insertions, 2 deletions
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