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:
Wen Congyang 2011-04-19 10:08:21 +08:00
parent 68c5b6fb2b
commit d2fd997ea6

View File

@ -433,7 +433,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
*/
virDomainObjRef(vm);
if (virThreadPoolSendJob(driver->workerPool, wdEvent) < 0) {
if (virDomainObjUnref(vm) < 0)
if (virDomainObjUnref(vm) == 0)
vm = NULL;
VIR_FREE(wdEvent);
}