summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-05-05 14:25:23 +0000
committerNick Clifton <nickc@redhat.com>2005-05-05 14:25:23 +0000
commitb8f43d6c72a95554022b7af808a50b6dd726c87b (patch)
tree90b4fc71d2b28707f21601c025ec7ca153fe8e21 /bfd/elf.c
parent744cd02803a206704006f2207c852057924a6831 (diff)
downloadgdb-b8f43d6c72a95554022b7af808a50b6dd726c87b.tar.gz
* dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently allocated memory
before returning. (decode_line_info): Likewise. (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory allocated by functions in this file. * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype. * elf.c (bfd_elf_close_and_cleanup): Call _bfd_dwarf2_cleanup_debug_info.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index c2e84387bd6..5477ba633a1 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6684,6 +6684,8 @@ _bfd_elf_close_and_cleanup (bfd *abfd)
_bfd_elf_strtab_free (elf_shstrtab (abfd));
}
+ _bfd_dwarf2_cleanup_debug_info (abfd);
+
return _bfd_generic_close_and_cleanup (abfd);
}