[libvirt] [PATCHv2] qemu: don't leak vm on failure

Eric Blake eblake at redhat.com
Fri Sep 6 22:23:08 UTC 2013


On 09/06/2013 11:55 AM, Eric Blake wrote:
> Failure to attach to a domain during 'virsh qemu-attach' left
> the list of domains in an odd state:
> 
> $ virsh qemu-attach 4176
> error: An error occurred, but the cause is unknown
> 

> -endjob:
>      if (qemuDomainObjEndJob(driver, vm) == 0) {
>          vm = NULL;
> -        goto cleanup;
> -    }

Hmm, I see that I tested something slightly different than what I posted
(the '{' needs to be deleted to match the '}' cleanup).  Consider that
squashed in.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130906/754bdd94/attachment-0001.sig>


More information about the libvir-list mailing list