From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdTKi-0005aP-MN for qemu-devel@nongnu.org; Sat, 09 Jun 2012 17:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SdTKg-0001ih-LL for qemu-devel@nongnu.org; Sat, 09 Jun 2012 17:36:32 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:58451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdTKg-0001iU-Ek for qemu-devel@nongnu.org; Sat, 09 Jun 2012 17:36:30 -0400 Message-ID: <4FD3C1DA.9000304@weilnetz.de> Date: Sat, 09 Jun 2012 23:36:26 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1337024840-28273-1-git-send-email-sw@weilnetz.de> <4FBBF5F6.7010204@weilnetz.de> In-Reply-To: <4FBBF5F6.7010204@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 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 >> --- >> 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