Re: [libvirt] [PATCH] Avoid invoking the qemu monitor destroy callback if the constructor fails

2010-06-30 Thread Daniel P. Berrange
On Wed, Jun 30, 2010 at 02:40:58PM +0200, Jiri Denemark wrote: > > diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c > > index f428665..ff613a0 100644 > > --- a/src/qemu/qemu_monitor.c > > +++ b/src/qemu/qemu_monitor.c > > @@ -671,6 +671,12 @@ qemuMonitorOpen(virDomainObjPtr vm, > >

Re: [libvirt] [PATCH] Avoid invoking the qemu monitor destroy callback if the constructor fails

2010-06-30 Thread Jiri Denemark
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c > index f428665..ff613a0 100644 > --- a/src/qemu/qemu_monitor.c > +++ b/src/qemu/qemu_monitor.c > @@ -671,6 +671,12 @@ qemuMonitorOpen(virDomainObjPtr vm, > return mon; > > cleanup: > +/* We don't want the 'destroy' callba

Re: [libvirt] [PATCH] Avoid invoking the qemu monitor destroy callback if the constructor fails

2010-06-29 Thread Eric Blake
On 06/29/2010 05:02 AM, Daniel P. Berrange wrote: > Some, but not all, codepaths in the qemuMonitorOpen() method > would trigger the destroy callback. The caller does not expect > this to be invoked if construction fails, only during normal > release of the monitor. This resulted in a possible doub

[libvirt] [PATCH] Avoid invoking the qemu monitor destroy callback if the constructor fails

2010-06-29 Thread Daniel P. Berrange
Some, but not all, codepaths in the qemuMonitorOpen() method would trigger the destroy callback. The caller does not expect this to be invoked if construction fails, only during normal release of the monitor. This resulted in a possible double-unref of the virDomainObjPtr, because the caller explic