diff options
author | Nick Clifton <nickc@redhat.com> | 2023-10-02 16:23:14 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-10-02 16:23:14 +0100 |
commit | dc63d5682e48ab64724a2da2ee803cd13bf5f0c0 (patch) | |
tree | 5f363ceb28d6edec7c5b3b9c7b888286dd740f7f /gas | |
parent | 6a6117ab0ffe18ea984abca84869eae799c1b346 (diff) | |
download | gdb-dc63d5682e48ab64724a2da2ee803cd13bf5f0c0.zip gdb-dc63d5682e48ab64724a2da2ee803cd13bf5f0c0.tar.gz gdb-dc63d5682e48ab64724a2da2ee803cd13bf5f0c0.tar.bz2 |
Fix memory leak in RiscV assembler.
PR 30861
* config/tc-riscv.c (riscv_insert_uleb128_fixes): Release duplicated memory.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-riscv.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c6e730f..fef3c24 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 0b8ecf9..4b7ff6d 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); } } |