verilog: fix wildcard port connections leaking memory
authorXiretza <xiretza@xiretza.xyz>
Thu, 18 Mar 2021 09:38:36 +0000 (10:38 +0100)
committerZachary Snow <zachary.j.snow@gmail.com>
Mon, 14 Jun 2021 17:56:51 +0000 (13:56 -0400)
frontends/verilog/verilog_parser.y

index 4e601b51d35c7062fd63a87df5c3a84f25cbde59..7d750ea28dea16788e8c3b26a95c398d3bfed2f2 100644 (file)
@@ -2084,6 +2084,7 @@ cell_port:
                if (!sv_mode)
                        frontend_verilog_yyerror("Wildcard port connections are only supported in SystemVerilog mode.");
                astbuf2->attributes[ID::wildcard_port_conns] = AstNode::mkconst_int(1, false);
+               free_attr($1);
        };
 
 always_comb_or_latch: