aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-02-15 18:43:20 +1030
committerAlan Modra <amodra@gmail.com>2023-02-15 22:03:30 +1030
commit11066c2aab90138a13ea2a34bee403c5fc38f10c (patch)
tree85a8ded82d6116a182547272eb2d3fbe45914d6b /binutils
parent2b56cd91911c7b813b7fe9f92fb86af404356001 (diff)
downloadgdb-11066c2aab90138a13ea2a34bee403c5fc38f10c.zip
gdb-11066c2aab90138a13ea2a34bee403c5fc38f10c.tar.gz
gdb-11066c2aab90138a13ea2a34bee403c5fc38f10c.tar.bz2
objdump -G memory leak
* objdump.c (find_stabs_section): Free stabs.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/objdump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 9dd1ebd..8a8bfba 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);
+ }
}
}
}