diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-01-28 18:42:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-01-28 18:42:54 +0000 |
commit | e6e3d4bdf4c9d28848bb19e51d4a949a8b12087c (patch) | |
tree | f359d9bb5a5323ab22c3ba5b8195cbac259472d6 /bfd/elf.c | |
parent | 0f1ec0f95fef8a5dd72292b260251282645a1ad9 (diff) | |
download | gdb-e6e3d4bdf4c9d28848bb19e51d4a949a8b12087c.zip gdb-e6e3d4bdf4c9d28848bb19e51d4a949a8b12087c.tar.gz gdb-e6e3d4bdf4c9d28848bb19e51d4a949a8b12087c.tar.bz2 |
* elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
have a bfd_object.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4236,7 +4236,11 @@ boolean _bfd_elf_close_and_cleanup (abfd) bfd *abfd; { - if (elf_shstrtab (abfd)) - _bfd_stringtab_free (elf_shstrtab (abfd)); + if (bfd_get_format (abfd) == bfd_object) + { + if (elf_shstrtab (abfd) != NULL) + _bfd_stringtab_free (elf_shstrtab (abfd)); + } + return _bfd_generic_close_and_cleanup (abfd); } |