提交 f14f0836 编写于 作者: C Cole Robinson

tests: qemuhotplug: Fix segfault when XML loading fails

Some tests use the same VM state multiple times in a row. But if we
failed loading the VM XML, subsequent tests crash on the NULL def
pointer
Acked-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 8e2982b5
......@@ -268,6 +268,10 @@ testQemuHotplug(const void *data)
if (test->vm) {
vm = test->vm;
if (!vm->def) {
VIR_TEST_VERBOSE("test skipped due to failure of dependent test\n");
goto cleanup;
}
} else {
if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml,
test->deviceDeletedEvent) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册