diff options
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index 323b30d..a621acc 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -1,5 +1,5 @@ /* Support for the generic parts of PE/PEI, for BFD. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Solutions. @@ -312,7 +312,7 @@ pe_mkobject_hook (abfd, filehdr, aouthdr) struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; pe_data_type *pe; - if (pe_mkobject (abfd) == false) + if (! pe_mkobject (abfd)) return NULL; pe = pe_data (abfd); @@ -1207,7 +1207,10 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc return NULL; if (bfd_bread (ptr, size, abfd) != size) - return NULL; + { + bfd_release (abfd, ptr); + return NULL; + } symbol_name = ptr; source_dll = ptr + strlen (ptr) + 1; @@ -1219,14 +1222,17 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc (_("%s: string not null terminated in ILF object file."), bfd_archive_filename (abfd)); bfd_set_error (bfd_error_malformed_archive); - + bfd_release (abfd, ptr); return NULL; } /* Now construct the bfd. */ if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name, source_dll, ordinal, types)) - return NULL; + { + bfd_release (abfd, ptr); + return NULL; + } return abfd->xvec; } |