提交 560758c9 编写于 作者: J Jim Meyering

qemu_driver: avoid NULL dereference

* src/qemu/qemu_driver.c (qemudDomainStart): After setting vm to NULL,
goto cleanup, rather than dereferencing the NULL pointer.
上级 2d665c9e
......@@ -6489,8 +6489,11 @@ static int qemudDomainStart(virDomainPtr dom) {
* We should still have a reference left to vm but
* one should check for 0 anyway
*/
if (qemuDomainObjEndJob(vm) == 0)
if (qemuDomainObjEndJob(vm) = 0) {
vm = NULL;
goto cleanup;
}
virDomainObjUnlock(vm);
qemuDriverUnlock(driver);
ret = qemudDomainRestore(dom->conn, managed_save);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册