mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
qemu_driver: avoid NULL dereference
* src/qemu/qemu_driver.c (qemudDomainStart): After setting vm to NULL, goto cleanup, rather than dereferencing the NULL pointer.
This commit is contained in:
parent
2d665c9e2d
commit
560758c900
@ -6489,8 +6489,11 @@ static int qemudDomainStart(virDomainPtr dom) {
|
|||||||
* We should still have a reference left to vm but
|
* We should still have a reference left to vm but
|
||||||
* one should check for 0 anyway
|
* one should check for 0 anyway
|
||||||
*/
|
*/
|
||||||
if (qemuDomainObjEndJob(vm) == 0)
|
if (qemuDomainObjEndJob(vm) = 0) {
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
virDomainObjUnlock(vm);
|
virDomainObjUnlock(vm);
|
||||||
qemuDriverUnlock(driver);
|
qemuDriverUnlock(driver);
|
||||||
ret = qemudDomainRestore(dom->conn, managed_save);
|
ret = qemudDomainRestore(dom->conn, managed_save);
|
||||||
|
Loading…
Reference in New Issue
Block a user