mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 20:12:01 +08:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user