inp2q.c, inp2m.c, plug a memory leak
This commit is contained in:
parent
43f24d6f22
commit
50c0424225
|
|
@ -93,12 +93,11 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current)
|
|||
save = line; /* saj - save the posn for later if
|
||||
the default mosfet model is used */
|
||||
|
||||
err_msg = INPgetMod(ckt, nname[i], &thismodel, tab);
|
||||
tfree(err_msg);
|
||||
txfree(INPgetMod(ckt, nname[i], &thismodel, tab));
|
||||
|
||||
/* check if using model binning -- pass in line since need 'l' and 'w' */
|
||||
if (!thismodel && i < 5)
|
||||
INPgetModBin(ckt, nname[i], &thismodel, tab, line);
|
||||
txfree(INPgetModBin(ckt, nname[i], &thismodel, tab, line));
|
||||
|
||||
if (thismodel)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode)
|
|||
INPgetTok(&line, &token, 1);
|
||||
if (i >= 3 && INPlookMod(token)) {
|
||||
INPinsert(&token, tab);
|
||||
INPgetMod(ckt, token, &thismodel, tab);
|
||||
txfree(INPgetMod(ckt, token, &thismodel, tab));
|
||||
if (!thismodel) {
|
||||
LITERR ("Unable to find definition of given model");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue