Skip to content

Commit b5248d6

Browse files
committed
ld: replace wrong bfd_malloc in nto.em
xmalloc should be called in ld instead of bfd_malloc. ld/ChangeLog: * emultempl/nto.em (nto_lookup_QNX_note_section): Replace bfd_malloc by xmalloc.
1 parent 4f6f3be commit b5248d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ld/emultempl/nto.em

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ nto_lookup_QNX_note_section(int type)
9898
continue;
9999

100100
/* Verify that this is a QNX note of the expected type. */
101-
sec->contents = bfd_malloc(sec->size);
101+
sec->contents = xmalloc(sec->size);
102102
if (!bfd_get_section_contents (sec->owner, sec, sec->contents, (file_ptr) 0,
103103
sec->size))
104104
einfo (_("%F%P: %pB: can't read contents of section .note: %E\n"),

0 commit comments

Comments
 (0)