Re: [PATCH] qemu: Unref domain on error of opening qemu monitor

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

 



On Thu, Oct 28, 2010 at 11:42:12AM +0800, Osier wrote:
> ä 2010å10æ28æ 11:06, Hu Tao åé:
> >The domain refed will be left unrefed when there is error when opening
> >qemu monitor, so unref it.
> >---
> >  src/qemu/qemu_driver.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> >index 25695df..4bcfb27 100644
> >--- a/src/qemu/qemu_driver.c
> >+++ b/src/qemu/qemu_driver.c
> >@@ -1385,7 +1385,7 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
> >            (driver->securityDriver,vm)<  0) {
> >          VIR_ERROR(_("Failed to set security context for monitor for %s"),
> >                    vm->def->name);
> >-        goto error;
> >+        return ret;
> 
> how could you unref the domain ref? it returns here.. :-)
> it even will give up closing priv->mon.

1. The domain is not refed yet here, so we can't unref it later.
2. The monitor is not opened yet here, so it is wrong to close it later.

-- 
Thanks,
Hu Tao

--
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]