提交 248de4a8 编写于 作者: J John Snow

ahci-test: fix memory leak

Use the proper free command to detroy an AHCICommand.
Signed-off-by: NJohn Snow <jsnow@redhat.com>
Message-id: 1452282920-21550-2-git-send-email-jsnow@redhat.com
上级 4ab0359a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册