From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvvvm-0002fm-Bw for qemu-devel@nongnu.org; Mon, 09 Nov 2015 18:32:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zvvvl-0000WA-1p for qemu-devel@nongnu.org; Mon, 09 Nov 2015 18:32:58 -0500 From: John Snow Date: Mon, 9 Nov 2015 18:32:40 -0500 Message-Id: <1447111968-15268-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1447111968-15268-1-git-send-email-jsnow@redhat.com> References: <1447111968-15268-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH 1/9] ahci-test: fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: John Snow , qemu-devel@nongnu.org Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow --- 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 59d387c..8370fa3 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1034,14 +1034,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