From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEPYI-0003oI-6n for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEPYA-0003sg-Ba for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEPYA-0003sZ-4i for qemu-devel@nongnu.org; Mon, 04 Aug 2014 17:12:10 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s74LC9fW029432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 4 Aug 2014 17:12:09 -0400 From: John Snow Date: Mon, 4 Aug 2014 17:11:25 -0400 Message-Id: <1407186691-16103-25-git-send-email-jsnow@redhat.com> In-Reply-To: <1407186691-16103-1-git-send-email-jsnow@redhat.com> References: <1407186691-16103-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v2 24/30] qtest/ide: Fix small memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, jsnow@redhat.com, stefanha@redhat.com, mst@redhat.com 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 --- 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