* [binutils-gdb] Fix memory leak in RiscV assembler.
@ 2023-10-02 15:24 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2023-10-02 15:24 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dc63d5682e48ab64724a2da2ee803cd13bf5f0c0
commit dc63d5682e48ab64724a2da2ee803cd13bf5f0c0
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Oct 2 16:23:14 2023 +0100
Fix memory leak in RiscV assembler.
PR 30861
* config/tc-riscv.c (riscv_insert_uleb128_fixes): Release duplicated memory.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/tc-riscv.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c6e730f5dcd..fef3c248196 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-02 Nick Clifton <nickc@redhat.com>
+
+ PR 30861
+ * config/tc-riscv.c (riscv_insert_uleb128_fixes): Release
+ duplicated memory.
+
2023-09-18 Jacob Navia <jacob@jacob.remcomp.fr>
* config/tc-riscv.c (riscv_ip_hardcode): Fully initialise the
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 0b8ecf96681..4b7ff6dcc43 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -4999,6 +4999,7 @@ riscv_insert_uleb128_fixes (bfd *abfd ATTRIBUTE_UNUSED,
exp_dup->X_add_symbol = exp->X_op_symbol;
fix_new_exp (fragP, fragP->fr_fix, 0,
exp_dup, 0, BFD_RELOC_RISCV_SUB_ULEB128);
+ free ((void *) exp_dup);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-02 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 15:24 [binutils-gdb] Fix memory leak in RiscV assembler Nick Clifton
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).