* [PATCH] gas: Fix create_note_reloc
@ 2024-04-09 23:03 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-04-09 23:03 UTC (permalink / raw)
To: binutils
* write.c (create_note_reloc): Replace XNEW with bfd_xalloc.
---
gas/write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/write.c b/gas/write.c
index 1a3a84ec4f6..27827d46469 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1961,7 +1961,7 @@ create_note_reloc (segT sec,
{
struct reloc_list * reloc;
- reloc = XNEW (struct reloc_list);
+ reloc = bfd_xalloc (stdoutput, sizeof (struct reloc_list));
/* We create a .b type reloc as resolve_reloc_expr_symbols() has already been called. */
reloc->u.b.sec = sec;
--
2.44.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-09 23:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09 23:03 [PATCH] gas: Fix create_note_reloc H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).