Re: [PATCH] qemu: fix the check of virDomainObjUnref()'s return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ä 2011-4-19 17:34, Daniel P. Berrange åé:
On Tue, Apr 19, 2011 at 10:08:21AM +0800, Wen Congyang wrote:
If vm is unlocked in virDomainObjUnref(), the return value is 0, not less
than 0.

---
  src/qemu/qemu_process.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1dfd005..7691cbe 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);

ACK

Thanks, pushed.



Daniel

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]