From 321b1293e7681ef3a0c9a1764e274a8e4c08d445 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 14 Nov 2018 22:50:48 +0100 Subject: [PATCH] plug two small memory leaks --- src/spicelib/parser/inp2dot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index f5a82516c..b7f01ec0b 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -62,7 +62,8 @@ dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, struct card *current, } GCA(INPapName, (ckt, which, foo, "outputref", &ptemp)); - INPgetTok(&line, &name, 1); + tfree(name); + INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "input", &ptemp)); @@ -70,6 +71,7 @@ dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, struct card *current, INPgetTok(&line, &steptype, 1); ptemp.iValue = 1; error = INPapName(ckt, which, foo, steptype, &ptemp); + tfree(steptype); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab);