[binutils-gdb] xtensa unnecessary free

Alan Modra amodra@sourceware.org
Fri Jan 17 06:07:19 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=006ccbe61ad0b61622a0934dd607f37620afc30a

commit 006ccbe61ad0b61622a0934dd607f37620afc30a
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jan 17 09:43:34 2025 +1030

    xtensa unnecessary free
    
    No path to "cleanup" label has internal_relocs malloc'd.
    
            * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Don't
            free internal_relocs in cleanup.

Diff:
---
 ld/emultempl/xtensaelf.em | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index 6c74bebb4e3..e3a9b2e6cf8 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -231,7 +231,6 @@ replace_insn_sec_with_prop_sec (bfd *abfd,
   if (prop_sec && prop_sec->owner)
     remove_section (abfd, prop_sec);
   free (insn_contents);
-  free (internal_relocs);
 
   return false;
 }


More information about the Binutils-cvs mailing list