提交 3b6b0a8a 编写于 作者: T Thomas Huth

tests/ide: Free pcibus when finishing a test

Once a test has finished, the pcibus structure should be freed, to
avoid leaking memory and to make sure that the structure is properly
re-initialized when the next test starts.
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: NJohn Snow <jsnow@redhat.com>
Signed-off-by: NThomas Huth <thuth@redhat.com>
上级 61793a62
......@@ -142,6 +142,10 @@ static void ide_test_start(const char *cmdline_fmt, ...)
static void ide_test_quit(void)
{
if (pcibus) {
qpci_free_pc(pcibus);
pcibus = NULL;
}
pc_alloc_uninit(guest_malloc);
guest_malloc = NULL;
qtest_end();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册