From 6a275a6bd90d70731f5a26857af3d4c16621b105 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 8 Jan 2017 20:13:59 +0100 Subject: [PATCH] inp2m.c, #4/7, rewrite --- src/spicelib/parser/inp2m.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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") &&