* aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything

if we don't have a bfd_object.
This commit is contained in:
Ian Lance Taylor 1994-04-04 23:44:13 +00:00
parent 8055d512fb
commit c4dd531f11
2 changed files with 6 additions and 0 deletions

View File

@ -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:

View File

@ -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));