From: Wen Congyang Date: Tue, 19 Apr 2011 02:08:21 +0000 (+0800) Subject: qemu: fix the check of virDomainObjUnref()'s return value X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d2fd997ea61ae17c241d9b19298e74244e1a1f37;p=libvirt.git qemu: fix the check of virDomainObjUnref()'s return value If vm is unlocked in virDomainObjUnref(), the return value is 0, not less than 0. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1dfd0052d2..7691cbe652 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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); }