Remove memory leak in the 'show' command.
Needs some more testing, as val is not always instanciated by malloc.
This commit is contained in:
parent
ee9578055f
commit
eb68de42d0
|
|
@ -1002,6 +1002,8 @@ printvals_old(dgen *dg, IFparm *p, int i)
|
||||||
IFvalue val;
|
IFvalue val;
|
||||||
int n, error;
|
int n, error;
|
||||||
|
|
||||||
|
memset(&val, 0, sizeof val);
|
||||||
|
|
||||||
if (dg->flags & DGEN_INSTANCE)
|
if (dg->flags & DGEN_INSTANCE)
|
||||||
error = ft_sim->askInstanceQuest
|
error = ft_sim->askInstanceQuest
|
||||||
(ft_curckt->ci_ckt, dg->instance, p->id, &val, &val);
|
(ft_curckt->ci_ckt, dg->instance, p->id, &val, &val);
|
||||||
|
|
@ -1081,6 +1083,8 @@ printvals_old(dgen *dg, IFparm *p, int i)
|
||||||
fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, " ******** ");
|
fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, " ******** ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p->dataType & IF_VECTOR)
|
||||||
|
tfree(val.v.vec.rVec);
|
||||||
|
|
||||||
return n - 1;
|
return n - 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue