From 301e31397f55349bbe90e4948c60f8361cb9ec44 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 4 May 2002 01:31:08 +0000 Subject: [PATCH] * opncls.c (_bfd_new_bfd_contained_in): Check return value of _bfd_new_bfd. --- bfd/ChangeLog | 5 +++++ bfd/opncls.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 92ff1609dd2..3537ea85a90 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-05-04 Bob Byrnes + + * 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. diff --git a/bfd/opncls.c b/bfd/opncls.c index 65a2a4252f1..f110259737a 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -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; -- 2.30.2