remove a small memoryleak in (nested) goto loops

This commit is contained in:
Holger Vogt 2018-08-31 14:55:40 +02:00
parent 70439e38fa
commit 0406546f7e
1 changed files with 3 additions and 0 deletions

View File

@ -427,6 +427,8 @@ doblock(struct control *bl, int *num)
bl->co_children);
if (!cn)
return (i);
else
tfree(i);
} else if (*i != NORMAL) {
*num = nn;
return (i);
@ -859,6 +861,7 @@ cp_evloop(char *string)
x = findlabel(i, control[stackp]);
if (!x)
fprintf(cp_err, "Error: label %s not found\n", i);
tfree(i);
}
if (x)
x = x->co_next;