mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
subckt.c, mif_inp2.c: plug XSPICE setup memory leaks
This commit is contained in:
@@ -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 */
|
/* copy in the last token, which is the model name */
|
||||||
if (name) {
|
if (name) {
|
||||||
bxx_printf(&buffer, "%s ", name);
|
bxx_printf(&buffer, "%s ", name);
|
||||||
|
tfree(name);
|
||||||
}
|
}
|
||||||
/* Set s to null string for compatibility with code */
|
/* Set s to null string for compatibility with code */
|
||||||
/* after switch statement */
|
/* after switch statement */
|
||||||
|
|||||||
@@ -732,6 +732,8 @@ MIFget_port_type(
|
|||||||
*status = MIF_OK;
|
*status = MIF_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (temp)
|
||||||
|
tfree(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -903,6 +905,8 @@ MIFget_port(
|
|||||||
*status = MIF_ERROR;
|
*status = MIF_ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/* free just the digital ones, the other are still assigned by INPtermInsert */
|
||||||
|
tfree(*next_token);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user