From: Ian Lance Taylor Date: Mon, 4 Apr 1994 23:44:13 +0000 (+0000) Subject: * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4dd531f11649c6143ef5bad2390374512e5828b;p=binutils-gdb.git * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything if we don't have a bfd_object. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9350dc7ab8a..abe6ed1527b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Mon Apr 4 15:30:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything + if we don't have a bfd_object. + Made sure that every call to bfd_read, bfd_write, and bfd_seek checks the return value and handled bfd_error correctly. These changes are not itemised. Also: diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 5d94fb44abb..2bd29ec115a 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -2880,6 +2880,9 @@ NAME(aout,bfd_free_cached_info) (abfd) { asection *o; + if (bfd_get_format (abfd) != bfd_object) + return true; + #define FREE(x) if (x != NULL) { free (x); x = NULL; } FREE (obj_aout_symbols (abfd)); FREE (obj_aout_external_syms (abfd));