PR29261, memory leak in parse_stab_struct_fields

PR 29261
	* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.
This commit is contained in:
Alan Modra
2022-06-20 10:39:13 +09:30
parent 49954a0d85
commit 8a24927bc8

View File

@ -2367,7 +2367,10 @@ parse_stab_struct_fields (void *dhandle,
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
staticsp, p_end))
return false;
{
free (fields);
return false;
}
++c;
}