Browse Source

subckt.c, mif_inp2.c: plug XSPICE setup memory leaks

h_vogt 14 years ago
parent
commit
0af75f3bd9
  1. 1
      src/frontend/subckt.c
  2. 4
      src/xspice/mif/mif_inp2.c

1
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 */

4
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:

Loading…
Cancel
Save