2007-07-26 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Thu, 26 Jul 2007 21:53:35 +0000 (21:53 +0000)
committerMichael Snyder <msnyder@vmware.com>
Thu, 26 Jul 2007 21:53:35 +0000 (21:53 +0000)
* linker.c (already_linked_newfunc): Check for NULL return from
bfd_hash_allocate.

bfd/ChangeLog
bfd/linker.c

index b51de1fcc9c7465bb88b4d7604221ddc1967e6ef..538436d4bb5ccfb8f207bbde964d15b22eb45ebb 100644 (file)
@@ -1,5 +1,8 @@
 2007-07-26  Michael Snyder  <msnyder@access-company.com>
 
+       * linker.c (already_linked_newfunc): Check for NULL return from
+       bfd_hash_allocate.
+
        * coffgen.c (fixup_symbol_value): Guard against null; 
        bfd_is_com_section will dereference the section pointer.
 
index f547a752a1620c3ee15b1d24562db8021a2bcf61..d31752be3733cb69522884b658dbde9a619d5adb 100644 (file)
@@ -2948,6 +2948,9 @@ already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED,
 
   ret->entry = NULL;
 
+  if (ret == NULL)
+    return ret;
+
   return &ret->root;
 }