From: teawater <teawater@gmail.com>
To: "Joel Brobecker" <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch]: Fix memory leak of symtab.c
Date: Thu, 10 Jul 2008 03:07:00 -0000 [thread overview]
Message-ID: <daef60380807092006u55923ffxdee59d8b885efe9@mail.gmail.com> (raw)
In-Reply-To: <20080709171536.GE18019@adacore.com>
OK. Thanks Joel.
2008-06-21 Hui Zhu <teawater@gmail.com>
* symtab.c (expand_line_sal): Fix a memory leak.
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4456,8 +4456,8 @@ expand_line_sal (struct symtab_and_line
blocks -- for each PC found above we see if there are other PCs
that are in the same block. If yes, the other PCs are filtered out. */
- filter = xmalloc (ret.nelts * sizeof (int));
- blocks = xmalloc (ret.nelts * sizeof (struct block *));
+ filter = alloca (ret.nelts * sizeof (int));
+ blocks = alloca (ret.nelts * sizeof (struct block *));
for (i = 0; i < ret.nelts; ++i)
{
filter[i] = 1;
On Thu, Jul 10, 2008 at 01:15, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2008-06-21 Hui Zhu <teawater@gmail.com>
>> * symtab.c (expand_line_sal): Fix a memory leak.
>
> Yes, this is OK. (just make sure to have an empty line between the
> ChangeLog header and the actual contents)
>
> Thank you!
>
> --
> Joel
>
next prev parent reply other threads:[~2008-07-10 3:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 6:57 teawater
2008-07-09 17:15 ` Joel Brobecker
2008-07-10 3:07 ` teawater [this message]
2008-07-13 17:03 ` Joel Brobecker
2008-07-14 5:58 ` teawater
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=daef60380807092006u55923ffxdee59d8b885efe9@mail.gmail.com \
--to=teawater@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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