From: Alan Modra Date: Wed, 15 Feb 2023 08:13:20 +0000 (+1030) Subject: objdump -G memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11066c2aab90138a13ea2a34bee403c5fc38f10c;p=binutils-gdb.git objdump -G memory leak * objdump.c (find_stabs_section): Free stabs. --- 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); + } } } }