mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: fix the check of virDomainObjUnref()'s return value
If vm is unlocked in virDomainObjUnref(), the return value is 0, not less than 0.
This commit is contained in:
parent
68c5b6fb2b
commit
d2fd997ea6
@ -433,7 +433,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
*/
|
*/
|
||||||
virDomainObjRef(vm);
|
virDomainObjRef(vm);
|
||||||
if (virThreadPoolSendJob(driver->workerPool, wdEvent) < 0) {
|
if (virThreadPoolSendJob(driver->workerPool, wdEvent) < 0) {
|
||||||
if (virDomainObjUnref(vm) < 0)
|
if (virDomainObjUnref(vm) == 0)
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
VIR_FREE(wdEvent);
|
VIR_FREE(wdEvent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user