X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf.c;fp=bfd%2Felf.c;h=9ca42e10d8e5b28090d6ce73cc65fbd456210123;hb=0ed18fa177858d67fec42babbca3fef4ae1d939f;hp=e335ff7efbfd8d19f18dc0c6a44332907ad5ec97;hpb=bb7322c67111024f5977deb85abd777ec713b1a9;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf.c b/bfd/elf.c index e335ff7efb..9ca42e10d8 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -9438,7 +9438,9 @@ bfd_boolean _bfd_elf_close_and_cleanup (bfd *abfd) { struct elf_obj_tdata *tdata = elf_tdata (abfd); - if (bfd_get_format (abfd) == bfd_object && tdata != NULL) + if (tdata != NULL + && (bfd_get_format (abfd) == bfd_object + || bfd_get_format (abfd) == bfd_core)) { if (elf_tdata (abfd)->o != NULL && elf_shstrtab (abfd) != NULL) _bfd_elf_strtab_free (elf_shstrtab (abfd));