forked from Imagelibrary/binutils-gdb
Duplicate DW_AT_call_file leak
When given two or more DW_AT_call_file for a given function we currently leak the concat memory. * dwarf2.c (scan_unit_for_symbols): Don't leak on duplicate DW_AT_call_file.
This commit is contained in:
@@ -4083,8 +4083,11 @@ scan_unit_for_symbols (struct comp_unit *unit)
|
||||
{
|
||||
case DW_AT_call_file:
|
||||
if (is_int_form (&attr))
|
||||
func->caller_file = concat_filename (unit->line_table,
|
||||
attr.u.val);
|
||||
{
|
||||
free (func->caller_file);
|
||||
func->caller_file = concat_filename (unit->line_table,
|
||||
attr.u.val);
|
||||
}
|
||||
break;
|
||||
|
||||
case DW_AT_call_line:
|
||||
|
||||
Reference in New Issue
Block a user