xtensa unnecessary free

Alan Modra amodra@gmail.com
Fri Jan 17 06:05:20 GMT 2025


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 --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;
 }

-- 
Alan Modra


More information about the Binutils mailing list