From 11066c2aab90138a13ea2a34bee403c5fc38f10c Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 15 Feb 2023 18:43:20 +1030 Subject: [PATCH] objdump -G memory leak * objdump.c (find_stabs_section): Free stabs. --- binutils/objdump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/binutils/objdump.c b/binutils/objdump.c index 9dd1ebd4da0..8a8bfba5c76 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4603,7 +4603,10 @@ find_stabs_section (bfd *abfd, asection *section, void *names) { stabs = read_section_stabs (abfd, section->name, &stab_size, NULL); if (stabs) - print_section_stabs (abfd, section->name, &sought->string_offset); + { + print_section_stabs (abfd, section->name, &sought->string_offset); + free (stabs); + } } } } -- 2.30.2