mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
have a bfd_object.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user