• J
    qemu: Save qemuDomainGetStats error · e1fc7ec0
    John Ferlan 提交于
    During qemuConnectGetAllDomainStats if qemuDomainGetStats causes
    a failure, then when collecting more than one domain's worth of
    statistics the loop in virDomainStatsRecordListFree would call
    virDomainFree which would call virResetLastError effectively wiping
    out the reason we failed leaving the caller with no idea why the
    collection failed.
    
    To fix this, let's Preserve the error and Restore it prior to return
    so that a caller such as 'virsh domstats' doesn't get the generic
    "error: An error occurred, but the cause is unknown".
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    Reviewed-by: NJán Tomko <jtomko@redhat.com>
    e1fc7ec0
qemu_driver.c 709.9 KB