[libvirt] [PATCH 5/8] qemu: implement vsock hotplug

Ján Tomko jtomko at redhat.com
Tue Jun 5 11:47:48 UTC 2018


On Tue, Jun 05, 2018 at 07:40:25AM -0400, John Ferlan wrote:
>
>[...]
>
>>> + cleanup:
>>> +    if (ret < 0) {
>>> +        virErrorPreserveLast(&originalError);
>>> +        if (releaseaddr)
>>> +            qemuDomainReleaseDeviceAddress(vm, &vsock->info, NULL);
>>> +        virErrorRestore(&originalError);
>>> +    }
>>> +
>>> +    virDomainVsockDefFree(vsock);
>>
>> This free is bogus - on success we consume the pointer and on failure
>> the caller frees the device.
>>
>> I'll remove it before pushing.
>>
>
>yeah, right. Saw this too and wondered, started looking for it, then got
>distracted... Looking again, now I wonder about qemuDomainAttachMemory
>

From qemuDomainAttachDeviceLive:

    case VIR_DOMAIN_DEVICE_MEMORY:
        /* note that qemuDomainAttachMemory always consumes dev->data.memory
         * and dispatches DeviceAdded event on success */
        ret = qemuDomainAttachMemory(driver, vm,
                                     dev->data.memory);
        dev->data.memory = NULL;
        break;

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180605/276400ea/attachment-0001.sig>


More information about the libvir-list mailing list