* opncls.c (_bfd_new_bfd_contained_in): Check return value of
authorAlan Modra <amodra@gmail.com>
Sat, 4 May 2002 01:31:08 +0000 (01:31 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 4 May 2002 01:31:08 +0000 (01:31 +0000)
_bfd_new_bfd.

bfd/ChangeLog
bfd/opncls.c

index 92ff1609dd289201e4fb3dcc2dba2abc0a7e494f..3537ea85a90fcb1fe986a4e4e22fb99868419afe 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-04  Bob Byrnes  <byrnes@curl.com>
+
+       * opncls.c (_bfd_new_bfd_contained_in): Check return value of
+       _bfd_new_bfd.
+
 2002-05-03  H.J. Lu  (hjl@gnu.org)
 
        * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
index 65a2a4252f12e2b54eb4ae71af0bd792be629a09..f110259737aa1397a91109be2839f8bd08442b84 100644 (file)
@@ -93,6 +93,8 @@ _bfd_new_bfd_contained_in (obfd)
   bfd *nbfd;
 
   nbfd = _bfd_new_bfd ();
+  if (nbfd == NULL)
+    return NULL;
   nbfd->xvec = obfd->xvec;
   nbfd->my_archive = obfd;
   nbfd->direction = read_direction;