* aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
[deliverable/binutils-gdb.git] / bfd / peicode.h
index 323b30d89d02f2d5edc9b7c958b1df7f7d57039e..a621acc4b27c88b1ccf5d873c7acdebdd94e9318 100644 (file)
@@ -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;
 }
This page took 0.02399 seconds and 4 git commands to generate.