diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index ccebd87bb..f7c5b562b 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -193,13 +193,12 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) err_msg = INPgetMod (ckt, model, &thismodel, tab); if (!thismodel) { INPgetModBin( ckt, model, &thismodel, tab, save ); - if (!thismodel) + if (!thismodel) { current->error = err_msg; - else - tfree(err_msg); + err_msg = NULL; + } } - else - tfree(err_msg); + tfree(err_msg); if (thismodel) { if (thismodel->INPmodType != INPtypelook ("Mos1") &&