diff options
author | Zachary Snow <zach@zachjs.com> | 2021-06-17 15:59:59 -0400 |
---|---|---|
committer | Zachary Snow <zachary.j.snow@gmail.com> | 2021-07-06 12:15:08 -0400 |
commit | 4446cfa524cf06e84add450214f64b2de6e199c3 (patch) | |
tree | 629b86e46d14930d22eb40cd2dbef804ac1038c3 /frontends/verilog | |
parent | 2b8f1633ce7800b4f0315f0206fd0bf9fba5237c (diff) | |
download | yosys-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.y | 6 |
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 |