aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-08-30 11:18:01 +0930
committerAlan Modra <amodra@gmail.com>2023-08-30 11:22:23 +0930
commitaa1e22eb8d685d456469f3da7933f9215b4d79ef (patch)
tree9e063bf5f9c128a387bbc99114dbac2cfa6e1265
parent02838630379cf76554a53be182bd9ad05a5a2a4d (diff)
downloadbinutils-aa1e22eb8d685d456469f3da7933f9215b4d79ef.zip
binutils-aa1e22eb8d685d456469f3da7933f9215b4d79ef.tar.gz
binutils-aa1e22eb8d685d456469f3da7933f9215b4d79ef.tar.bz2
objdump: Free sorted_syms on error path
* objdump.c (disassemble_data): Free sorted_syms before returning.
-rw-r--r--binutils/objdump.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index fb0db5d..6081342 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;
}