Skip to content

Commit d2a1ef4

Browse files
authored
Merge pull request verilog-to-routing#662 from j-b-1-7/odin_leak_connect_memory_and_alias
odin Fixed memory leak in connect_memory_and_alias function in netlist_cre…
2 parents baf9557 + 24efe2d commit d2a1ef4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ODIN_II/SRC/netlist_create_from_ast.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,7 @@ void connect_memory_and_alias(ast_node_t* hb_instance, char *instance_name_prefi
22712271
/* Lookup port size in cache */
22722272
port_size = get_memory_port_size(alias_name);
22732273
vtr::free(alias_name);
2274+
vtr::free(full_name);
22742275
oassert(port_size != 0);
22752276

22762277
for (j = 0; j < port_size; j++)
@@ -2311,6 +2312,8 @@ void connect_memory_and_alias(ast_node_t* hb_instance, char *instance_name_prefi
23112312
hb_instance->children[1]->children[0]->types.identifier,
23122313
hb_connect_list->children[i]->children[0]->types.identifier, -1);
23132314
}
2315+
2316+
23142317

23152318
/* Search for the old_input name */
23162319
sc_spot_input_old = sc_lookup_string(input_nets_sc, alias_name);

0 commit comments

Comments
 (0)