aboutsummaryrefslogtreecommitdiff
path: root/bfd/nlmcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/nlmcode.h')
-rw-r--r--bfd/nlmcode.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index 1ae6cc9..13e4319 100644
--- a/bfd/nlmcode.h
+++ b/bfd/nlmcode.h
@@ -1050,7 +1050,7 @@ nlm_slurp_reloc_fixups (abfd)
count = nlm_fixed_header (abfd)->numberOfRelocationFixups;
rels = (arelent *) bfd_alloc (abfd, count * sizeof (arelent));
secs = (asection **) bfd_alloc (abfd, count * sizeof (asection *));
- if (rels == NULL || secs == NULL)
+ if ((rels == NULL || secs == NULL) && count != 0)
{
bfd_set_error (bfd_error_no_memory);
return false;
@@ -1136,8 +1136,6 @@ nlm_canonicalize_reloc (abfd, sec, relptr, symbols)
if (nlm_slurp_reloc_fixups (abfd) == false)
return -1;
rels = nlm_relocation_fixups (abfd);
- if (rels == NULL)
- return -1;
}
secs = nlm_relocation_fixup_secs (abfd);