[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline comp

From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion
Date: Sat, 09 Jun 2012 23:36:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120506 Iceowl/1.0b1 Icedove/3.0.11

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<address@hidden>
  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)
+    for (i = 0; i<  rs->nb_completions; i++) {
+        g_free(rs->completions[i]);
+    }

  /* return true if command handled */


This patch is for QEMU 1.1, but was not committed up to now.

Stefan Weil

Ping^2? Should I send a pull request?
The patch is available at http://patchwork.ozlabs.org/patch/159139/.


Stefan Weil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]