inpcom.c: remove memory leak
This commit is contained in:
parent
b45c4ea78b
commit
6a6c49516a
|
|
@ -3407,7 +3407,9 @@ get_number_terminals(char *c)
|
||||||
i = j = 0;
|
i = j = 0;
|
||||||
/* find the last token in the line*/
|
/* find the last token in the line*/
|
||||||
while ((i < 100) && (*c != '\0')) {
|
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, '='))
|
if (strchr(nam_buf, '='))
|
||||||
j++;
|
j++;
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue