From: Luiz Capitulino <lcapitulino@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
Date: Tue, 12 Jun 2012 16:42:39 -0300 [thread overview]
Message-ID: <20120612164239.4be3d0f2@doriath.home> (raw)
In-Reply-To: <4FD3C1DA.9000304@weilnetz.de>
On Sat, 09 Jun 2012 23:36:26 +0200
Stefan Weil <sw@weilnetz.de> wrote:
> Am 22.05.2012 22:24, schrieb Stefan Weil:
> > Am 14.05.2012 21:47, schrieb Stefan Weil:
> >> Each string which is shown during readline completion in the QEMU
> >> monitor
> >> is allocated dynamically but currently never deallocated.
> >>
> >> Add the missing loop which calls g_free for the allocated strings.
> >>
> >> Signed-off-by: Stefan Weil<sw@weilnetz.de>
> >> ---
> >> readline.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/readline.c b/readline.c
> >> index a6c0039..646b6e8 100644
> >> --- a/readline.c
> >> +++ b/readline.c
> >> @@ -337,6 +337,9 @@ static void readline_completion(ReadLineState *rs)
> >> }
> >> readline_show_prompt(rs);
> >> }
> >> + for (i = 0; i< rs->nb_completions; i++) {
> >> + g_free(rs->completions[i]);
> >> + }
> >> }
> >>
> >> /* return true if command handled */
> >
> > Ping?
> >
> > This patch is for QEMU 1.1, but was not committed up to now.
> >
> > Regards,
> > Stefan Weil
> >
>
>
> Ping^2? Should I send a pull request?
> The patch is available at http://patchwork.ozlabs.org/patch/159139/.
Applied to the qmp branch, thanks.
next prev parent reply other threads:[~2012-06-12 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 19:47 [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion Stefan Weil
2012-05-22 20:24 ` Stefan Weil
2012-06-09 21:36 ` Stefan Weil
2012-06-12 19:42 ` Luiz Capitulino [this message]
2012-06-11 12:19 ` Stefan Hajnoczi
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=20120612164239.4be3d0f2@doriath.home \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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 NNTP newsgroup(s).