mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
binutils/dwarf.c abbrev list leak
* dwarf.c (process_debug_info): Call free_abrev_list on return paths.
This commit is contained in:
parent
a422bb9db1
commit
0283863037
@ -3997,7 +3997,11 @@ process_debug_info (struct dwarf_section * section,
|
||||
}
|
||||
}
|
||||
if (dwarf_start_die != 0 && level < saved_level)
|
||||
return true;
|
||||
{
|
||||
if (list != NULL)
|
||||
free_abbrev_list (list);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -4038,6 +4042,8 @@ process_debug_info (struct dwarf_section * section,
|
||||
}
|
||||
warn (_("DIE at offset %#lx refers to abbreviation number %lu which does not exist\n"),
|
||||
die_offset, abbrev_number);
|
||||
if (list != NULL)
|
||||
free_abbrev_list (list);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user