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

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



On 09/08/2013 08:29 AM, Osier Yang wrote:
> On 07/09/13 01:55, 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
>>

>>
>> * src/qemu/qemu_driver.c (qemuDomainCreateXML): Don't leak vm on
>> failure to obtain job.
>> (qemuDomainQemuAttach): Match cleanup of qemuDomainCreateXML.
>>
>> Signed-off-by: Eric Blake <eblake redhat com>
>> ---
>>
>> v1 was discussed here:
>> https://www.redhat.com/archives/libvir-list/2013-September/msg00362.html
>> changes since then: plug another leak of vm, and clean up some style.
>> Expand the commit message to explain unusual paths.
>>

>>
>>       if (qemuProcessAttach(conn, driver, vm, pid,
>>                             pidfile, monConfig, monJSON) < 0) {
>> +        if (qemuDomainObjEndJob(driver, vm) > 0)
> 
> Just realized that qemuDomainObjEndJob returns bool value. We may need a
> follow up patch to clean it up.

I'll work on that; as you say, it can be a followup, and touches more
call sites.

> 
> ACK with "{" removed.

Thanks; pushed.

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

Attachment: signature.asc
Description: OpenPGP digital signature


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