fix a small memory leak in spice_netlist.c
This commit is contained in:
parent
8d155af82f
commit
eb6f9f1f4e
|
|
@ -4804,19 +4804,27 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
draw();
|
||||
|
||||
del_object_table();
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
else if(argc > 2 && atoi(argv[2]) == 2) {
|
||||
copy_hierarchy_data(".drw", ".x1.drw");
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
else if(argc > 2 && atoi(argv[2]) == 3) {
|
||||
Xschem_ctx **save_xctx = get_save_xctx();
|
||||
save_xctx[1]->raw = save_xctx[0]->raw;
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
else if(argc > 4 && atoi(argv[2]) == 4) {
|
||||
raw_read(argv[3], &xctx->raw, argv[4]);
|
||||
xctx->raw->level = 0;
|
||||
else if(argc > 2 && atoi(argv[2]) == 4) {
|
||||
Xschem_ctx **save_xctx = get_save_xctx();
|
||||
save_xctx[1]->raw = NULL;
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
else if(argc > 2 && atoi(argv[2]) == 5) {
|
||||
Xschem_ctx **save_xctx = get_save_xctx();
|
||||
Tcl_SetResult(interp, save_xctx[1]->raw == NULL ? "null" : "not null", TCL_VOLATILE);
|
||||
|
||||
}
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
|
||||
/* text x y rot flip text props size draw
|
||||
|
|
|
|||
|
|
@ -326,8 +326,8 @@ int global_spice_netlist(int global) /* netlister driver */
|
|||
found_top_symbol = 1;
|
||||
}
|
||||
remove_symbol(xctx->symbols - 1);
|
||||
my_free(_ALLOC_ID_, &top_symbol_name);
|
||||
}
|
||||
my_free(_ALLOC_ID_, &top_symbol_name);
|
||||
if(!found_top_symbol) {
|
||||
for(i=0;i<xctx->instances; ++i) {
|
||||
if(skip_instance(i, 1, lvs_ignore)) continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue