From: John Snow Date: Mon, 11 Jan 2016 19:10:42 +0000 (-0500) Subject: ahci-test: fix memory leak X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=248de4a89915001e64176580d620d22b612e06f2;p=qemu.git ahci-test: fix memory leak 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 --- diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 088850642e..f4945dc70b 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);