diff --git a/src/actions.c b/src/actions.c index 82a02634..52a300e5 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1217,10 +1217,10 @@ void get_additional_symbols(int what) static int num_syms; /* no context switch between start and end so it is safe */ Int_hashentry *found; Int_hashtable sym_table = {NULL, 0}; - int_hash_init(&sym_table, HASHSIZE); if(what == 1) { /* start */ + int_hash_init(&sym_table, HASHSIZE); num_syms = xctx->symbols; for(i = 0; i < xctx->symbols; ++i) { int_hash_lookup(&sym_table, xctx->sym[i].name, i, XINSERT); @@ -1274,7 +1274,6 @@ void get_additional_symbols(int what) } xctx->symbols = num_syms; } - int_hash_free(&sym_table); } void get_sch_from_sym(char *filename, xSymbol *sym, int inst) diff --git a/src/spice_netlist.c b/src/spice_netlist.c index f1d89e46..f1837418 100644 --- a/src/spice_netlist.c +++ b/src/spice_netlist.c @@ -105,7 +105,8 @@ void hier_psprint(char **res, int what) /* netlister driver */ } } } - get_additional_symbols(0); + /* can not free additional syms since *_block_netlist() may have loaded additional syms */ + /* get_additional_symbols(0); */ my_free(_ALLOC_ID_, &abs_path); str_hash_free(&subckt_table); my_free(_ALLOC_ID_, &subckt_name); @@ -427,7 +428,7 @@ int global_spice_netlist(int global) /* netlister driver */ } } my_free(_ALLOC_ID_, &abs_path); - get_additional_symbols(0); + /* get_additional_symbols(0); */ my_free(_ALLOC_ID_, &subckt_name); /*clear_drawing(); */ my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); diff --git a/src/tedax_netlist.c b/src/tedax_netlist.c index 42c22255..6dfd4c41 100644 --- a/src/tedax_netlist.c +++ b/src/tedax_netlist.c @@ -222,7 +222,8 @@ int global_tedax_netlist(int global) /* netlister driver */ } } my_free(_ALLOC_ID_, &abs_path); - get_additional_symbols(0); + /* can not free additional syms since *_block_netlist() may have loaded additional syms */ + /* get_additional_symbols(0); */ str_hash_free(&subckt_table); my_free(_ALLOC_ID_, &subckt_name); /*clear_drawing(); */ diff --git a/src/verilog_netlist.c b/src/verilog_netlist.c index 5f808104..c6fe7a34 100644 --- a/src/verilog_netlist.c +++ b/src/verilog_netlist.c @@ -375,7 +375,8 @@ int global_verilog_netlist(int global) /* netlister driver */ } } my_free(_ALLOC_ID_, &abs_path); - get_additional_symbols(0); + /* can not free additional syms since *_block_netlist() may have loaded additional syms */ + /* get_additional_symbols(0); */ str_hash_free(&subckt_table); my_free(_ALLOC_ID_, &subckt_name); my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); diff --git a/src/vhdl_netlist.c b/src/vhdl_netlist.c index 48f398b8..ee536108 100644 --- a/src/vhdl_netlist.c +++ b/src/vhdl_netlist.c @@ -475,7 +475,8 @@ int global_vhdl_netlist(int global) /* netlister driver */ } } my_free(_ALLOC_ID_, &abs_path); - get_additional_symbols(0); + /* can not free additional syms since *_block_netlist() may have loaded additional syms */ + /* get_additional_symbols(0); */ str_hash_free(&subckt_table); my_free(_ALLOC_ID_, &subckt_name); my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch]));