c4c44b5 qemuDomainAttachDeviceLiveAndConfig: Don't overwrite @ret

Authored and Committed by mprivozn 4 years ago
    qemuDomainAttachDeviceLiveAndConfig: Don't overwrite @ret
    
    If we're attaching a device to both inactive and live XML then
    @ret is overwritten which may result in incorrect return value.
    For instance, if attaching to inactive XML succeeds, @ret is
    assigned value of zero and control proceeds to attaching the
    device to live XML. Here, if say
    virDomainDeviceValidateAliasForHotplug() fails the control jumps
    over to 'cleanup' label and zero is returned indicating success.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    
        
file modified
+11 -12