mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
inpcom.c: remove memory leak
This commit is contained in:
@@ -3407,7 +3407,9 @@ get_number_terminals(char *c)
|
||||
i = j = 0;
|
||||
/* find the last token in the line*/
|
||||
while ((i < 100) && (*c != '\0')) {
|
||||
strncpy(nam_buf, gettok_instance(&c), 32);
|
||||
char *tmp_inst = gettok_instance(&c);
|
||||
strncpy(nam_buf, tmp_inst, 32);
|
||||
tfree(tmp_inst);
|
||||
if (strchr(nam_buf, '='))
|
||||
j++;
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user