aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/dwarf.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index d6fc9fe..d08f01c 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -990,6 +990,7 @@ process_abbrev_set (struct dwarf_section *section,
list->first_abbrev = NULL;
list->last_abbrev = NULL;
list->raw = start;
+ list->next = NULL;
while (start < end)
{
@@ -1005,17 +1006,13 @@ process_abbrev_set (struct dwarf_section *section,
the caller. */
if (start == end || entry == 0)
{
- list->next = NULL;
list->start_of_next_abbrevs = start != end ? start : NULL;
return list;
}
READ_ULEB (tag, start, end);
if (start == end)
- {
- free (list);
- return NULL;
- }
+ return free_abbrev_list (list);
children = *start++;
@@ -1050,8 +1047,7 @@ process_abbrev_set (struct dwarf_section *section,
/* Report the missing single zero which ends the section. */
error (_("%s section not zero terminated\n"), section->name);
- free (list);
- return NULL;
+ return free_abbrev_list (list);
}
/* Return a sequence of abbrevs in SECTION starting at ABBREV_BASE