Received: from eggs.gnu.org ([2001:4830:134:3::10]:50175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKyx-0006Tc-M8 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIKyr-0000In-EW for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKyr-0000If-6H for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:07:57 -0400 From: Stefan Hajnoczi Date: Fri, 15 Aug 2014 18:06:31 +0100 Message-Id: <1408122422-13935-25-git-send-email-stefanha@redhat.com> In-Reply-To: <1408122422-13935-1-git-send-email-stefanha@redhat.com> References: <1408122422-13935-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 24/55] qtest/ide: Fix small memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , John Snow , Stefan Hajnoczi From: John Snow For libqos debugging purposes, it's nice to be able to assert that tests and associated libraries have no memory leaks. To that end, free up the trivial cmdline leak. The remaining leaks caused by pc_alloc_init are fixed instead by my first-fit pc_alloc implementation already on the qemu-devel mailing list. Signed-off-by: John Snow Signed-off-by: Stefan Hajnoczi --- tests/ide-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index e2b4efc..a77a037 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -120,6 +120,8 @@ static void ide_test_start(const char *cmdline_fmt, ...) qtest_start(cmdline); qtest_irq_intercept_in(global_qtest, "ioapic"); guest_malloc = pc_alloc_init(); + + g_free(cmdline); } static void ide_test_quit(void) -- 1.9.3