aboutsummaryrefslogtreecommitdiff
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
commit35330cce1aa1c88c8724038fdb8e2ab9b4e45186 (patch)
tree57414b15123592069ad272a6e70821df21fa04f9 /bfd/elf.c
parentd8244a4aba2c284db8fc896e3b4c6591c24f11d8 (diff)
downloadgdb-35330cce1aa1c88c8724038fdb8e2ab9b4e45186.zip
gdb-35330cce1aa1c88c8724038fdb8e2ab9b4e45186.tar.gz
gdb-35330cce1aa1c88c8724038fdb8e2ab9b4e45186.tar.bz2
* 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 c2e8438..5477ba6 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);
}