From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHhlH-00077W-4z for qemu-devel@nongnu.org; Fri, 08 Jan 2016 19:52:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHhlG-0005kJ-B8 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 19:52:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHhlG-0005kB-6M for qemu-devel@nongnu.org; Fri, 08 Jan 2016 19:52:06 -0500 From: John Snow Date: Fri, 8 Jan 2016 19:51:50 -0500 Message-Id: <1452300718-10660-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1452300718-10660-1-git-send-email-jsnow@redhat.com> References: <1452300718-10660-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PULL 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