objdump -G memory leak

* objdump.c (find_stabs_section): Free stabs.
This commit is contained in:
Alan Modra
2023-02-15 18:43:20 +10:30
parent 2b56cd9191
commit 11066c2aab

View File

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