diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index a696d4c69..fafcbe005 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -1028,6 +1028,7 @@ translate(struct line *deck, char *formal, char *actual, char *scname, char *sub /* copy in the last token, which is the model name */ if (name) { bxx_printf(&buffer, "%s ", name); + tfree(name); } /* Set s to null string for compatibility with code */ /* after switch statement */ diff --git a/src/xspice/mif/mif_inp2.c b/src/xspice/mif/mif_inp2.c index 6aea4aadf..a60bdc096 100644 --- a/src/xspice/mif/mif_inp2.c +++ b/src/xspice/mif/mif_inp2.c @@ -732,6 +732,8 @@ MIFget_port_type( *status = MIF_OK; } + if (temp) + tfree(temp); } @@ -903,6 +905,8 @@ MIFget_port( *status = MIF_ERROR; return; } + /* free just the digital ones, the other are still assigned by INPtermInsert */ + tfree(*next_token); break; default: