From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIiEC-0003l9-Ci for qemu-devel@nongnu.org; Mon, 11 Jan 2016 14:34:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIiE9-0004hs-O1 for qemu-devel@nongnu.org; Mon, 11 Jan 2016 14:34:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIiE9-0004hn-IO for qemu-devel@nongnu.org; Mon, 11 Jan 2016 14:34:05 -0500 From: John Snow Date: Mon, 11 Jan 2016 14:33:52 -0500 Message-Id: <1452540840-23433-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1452540840-23433-1-git-send-email-jsnow@redhat.com> References: <1452540840-23433-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PULL v2 03/11] ahci-test: fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jsnow@redhat.com Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow Message-id: 1452282920-21550-2-git-send-email-jsnow@redhat.com --- tests/ahci-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 0888506..f4945dc 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1045,14 +1045,14 @@ static void test_dma_fragmented(void) ahci_command_commit(ahci, cmd, px); ahci_command_issue(ahci, cmd); ahci_command_verify(ahci, cmd); - g_free(cmd); + ahci_command_free(cmd); cmd = ahci_command_create(CMD_READ_DMA); ahci_command_adjust(cmd, 0, ptr, bufsize, 32); ahci_command_commit(ahci, cmd, px); ahci_command_issue(ahci, cmd); ahci_command_verify(ahci, cmd); - g_free(cmd); + ahci_command_free(cmd); /* Read back the guest's receive buffer into local memory */ bufread(ptr, rx, bufsize); -- 2.4.3