projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a422bb9
)
binutils/dwarf.c abbrev list leak
author
Alan Modra
<amodra@gmail.com>
Wed, 30 Aug 2023 01:40:58 +0000
(11:10 +0930)
committer
Alan Modra
<amodra@gmail.com>
Wed, 30 Aug 2023 01:52:23 +0000
(11:22 +0930)
* dwarf.c (process_debug_info): Call free_abrev_list on
return paths.
binutils/dwarf.c
patch
|
blob
|
history
diff --git
a/binutils/dwarf.c
b/binutils/dwarf.c
index 80bbc547bb1b37453bf707dad45d8f5dd38e99ec..9e22a74209e6964f1445f48ab4143908dff15ee3 100644
(file)
--- a/
binutils/dwarf.c
+++ b/
binutils/dwarf.c
@@
-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;
}