From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWvd6-0007JP-Bi for qemu-devel@nongnu.org; Tue, 22 May 2012 16:24:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWvd4-0005gc-G7 for qemu-devel@nongnu.org; Tue, 22 May 2012 16:24:27 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:58170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWvd4-0005gQ-9b for qemu-devel@nongnu.org; Tue, 22 May 2012 16:24:26 -0400 Message-ID: <4FBBF5F6.7010204@weilnetz.de> Date: Tue, 22 May 2012 22:24:22 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1337024840-28273-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1337024840-28273-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org 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 > --- > 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