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

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

commit aa1e22eb8d685d456469f3da7933f9215b4d79ef
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Aug 30 11:18:01 2023 +0930

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

Diff:
---
 binutils/objdump.c | 1 +
 1 file changed, 1 insertion(+)

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

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30  3:16 [binutils-gdb] 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).