fix small memory leak
This commit is contained in:
parent
3f85766c10
commit
1991b409e0
|
|
@ -1798,7 +1798,6 @@ void get_additional_symbols(int what)
|
||||||
copy_symbol(&xctx->sym[j], xctx->inst[i].ptr + xctx->sym);
|
copy_symbol(&xctx->sym[j], xctx->inst[i].ptr + xctx->sym);
|
||||||
xctx->sym[j].base_name = (xctx->inst[i].ptr + xctx->sym)->name;
|
xctx->sym[j].base_name = (xctx->inst[i].ptr + xctx->sym)->name;
|
||||||
my_strdup(_ALLOC_ID_, &xctx->sym[j].name, sym);
|
my_strdup(_ALLOC_ID_, &xctx->sym[j].name, sym);
|
||||||
my_free(_ALLOC_ID_, &sym);
|
|
||||||
if(spice_sym_def)
|
if(spice_sym_def)
|
||||||
my_strdup(_ALLOC_ID_, &xctx->sym[j].prop_ptr,
|
my_strdup(_ALLOC_ID_, &xctx->sym[j].prop_ptr,
|
||||||
subst_token(xctx->sym[j].prop_ptr, "spice_sym_def", spice_sym_def));
|
subst_token(xctx->sym[j].prop_ptr, "spice_sym_def", spice_sym_def));
|
||||||
|
|
@ -1812,6 +1811,7 @@ void get_additional_symbols(int what)
|
||||||
} else {
|
} else {
|
||||||
j = found->value;
|
j = found->value;
|
||||||
}
|
}
|
||||||
|
my_free(_ALLOC_ID_, &sym);
|
||||||
}
|
}
|
||||||
my_free(_ALLOC_ID_, &sch);
|
my_free(_ALLOC_ID_, &sch);
|
||||||
my_free(_ALLOC_ID_, &spice_sym_def);
|
my_free(_ALLOC_ID_, &spice_sym_def);
|
||||||
|
|
|
||||||
|
|
@ -4655,7 +4655,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
hash_objects();
|
hash_objects();
|
||||||
dbg(0, "n_hash_objects=%d\n", xctx->n_hash_objects);
|
dbg(0, "n_hash_objects=%d\n", xctx->n_hash_objects);
|
||||||
|
|
||||||
for(init_object_iterator(&ctx, 1000., -1000., 2000., -400.); (objectptr = object_iterator_next(&ctx)) ;) {
|
for(init_object_iterator(&ctx, -420., -970., 1300., -250.); (objectptr = object_iterator_next(&ctx)) ;) {
|
||||||
type = objectptr->type;
|
type = objectptr->type;
|
||||||
n = objectptr->n;
|
n = objectptr->n;
|
||||||
c = objectptr->c;
|
c = objectptr->c;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue