public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* objdump: Free sorted_syms on error path
@ 2023-08-30  1:55 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-08-30  1:55 UTC (permalink / raw)
  To: binutils

	* objdump.c (disassemble_data): Free sorted_syms before returning.

diff --git a/binutils/objdump.c b/binutils/objdump.c
index fb0db5d4fe8..60813426566 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -4151,6 +4151,7 @@ disassemble_data (bfd *abfd)
       non_fatal (_("can't disassemble for architecture %s\n"),
 		 bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
       exit_status = 1;
+      free (sorted_syms);
       return;
     }
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-30  1:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30  1:55 objdump: Free sorted_syms on error path Alan Modra

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).