From e6e3d4bdf4c9d28848bb19e51d4a949a8b12087c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 28 Jan 1998 18:42:54 +0000 Subject: [PATCH] * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we have a bfd_object. --- bfd/ChangeLog | 9 +++++++-- bfd/elf.c | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c2755e785cb..0dd61b966ca 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 28 13:41:26 1998 Ian Lance Taylor + + * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we + have a bfd_object. + Tue Jan 27 21:43:55 1998 Richard Henderson Sparc v9 ABI compliant PLT: @@ -41,8 +46,8 @@ Tue Jan 27 15:06:04 1998 Nick Clifton Tue Jan 27 12:47:27 1998 Robert Lipe - * config.bfd (i[3456]86-sco3.2v5*) ELF now the default. - (i[3456]86sco3.2v5*coff) New target. + * config.bfd (i[3456]86-sco3.2v5*): ELF now the default. + (i[3456]86sco3.2v5*coff): New target. Mon Jan 26 15:41:30 1998 Ian Lance Taylor diff --git a/bfd/elf.c b/bfd/elf.c index fa83495d330..71d13f78af2 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -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); } -- 2.30.2