From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] objdump -G memory leak
Date: Wed, 15 Feb 2023 11:35:33 +0000 (GMT) [thread overview]
Message-ID: <20230215113533.E76263858289@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=11066c2aab90138a13ea2a34bee403c5fc38f10c
commit 11066c2aab90138a13ea2a34bee403c5fc38f10c
Author: Alan Modra <amodra@gmail.com>
Date: Wed Feb 15 18:43:20 2023 +1030
objdump -G memory leak
* objdump.c (find_stabs_section): Free stabs.
Diff:
---
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);
+ }
}
}
}
reply other threads:[~2023-02-15 11:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230215113533.E76263858289@sourceware.org \
--to=amodra@sourceware.org \
--cc=bfd-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).