mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
do not leak type fields
Thanks to Daniel Xu for reporting.
This commit is contained in:
parent
c6b41eb8c8
commit
5f4b42abc7
4
parse.c
4
parse.c
@ -1092,6 +1092,7 @@ void
|
|||||||
parse(FILE *f, char *path, void data(Dat *), void func(Fn *))
|
parse(FILE *f, char *path, void data(Dat *), void func(Fn *))
|
||||||
{
|
{
|
||||||
Lnk lnk;
|
Lnk lnk;
|
||||||
|
uint n;
|
||||||
|
|
||||||
lexinit();
|
lexinit();
|
||||||
inf = f;
|
inf = f;
|
||||||
@ -1115,6 +1116,9 @@ parse(FILE *f, char *path, void data(Dat *), void func(Fn *))
|
|||||||
parsetyp();
|
parsetyp();
|
||||||
break;
|
break;
|
||||||
case Teof:
|
case Teof:
|
||||||
|
for (n=0; n<ntyp; n++)
|
||||||
|
if (typ[n].nunion)
|
||||||
|
vfree(typ[n].fields);
|
||||||
vfree(typ);
|
vfree(typ);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user