* [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
@ 2012-05-14 19:47 Stefan Weil
2012-05-22 20:24 ` Stefan Weil
2012-06-11 12:19 ` Stefan Hajnoczi
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Weil @ 2012-05-14 19:47 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel
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 */
--
1.7.10
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
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-11 12:19 ` Stefan Hajnoczi
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2012-05-22 20:24 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
2012-05-22 20:24 ` Stefan Weil
@ 2012-06-09 21:36 ` Stefan Weil
2012-06-12 19:42 ` Luiz Capitulino
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2012-06-09 21:36 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
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/.
Regards,
Stefan Weil
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
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-11 12:19 ` Stefan Hajnoczi
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-06-11 12:19 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel
On Mon, May 14, 2012 at 8:47 PM, Stefan Weil <sw@weilnetz.de> wrote:
> 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(+)
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
2012-06-09 21:36 ` Stefan Weil
@ 2012-06-12 19:42 ` Luiz Capitulino
0 siblings, 0 replies; 5+ messages in thread
From: Luiz Capitulino @ 2012-06-12 19:42 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-12 19:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-06-11 12:19 ` Stefan Hajnoczi
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).