mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemuMonitorJSONGetMigrationStats: Don't clear @stats on failure
In the qemuMonitorJSONGetMigrationStats() there's a code under cleanup label that's clearing returned @stats if the function returns with an error. However, transitively there's just one caller - qemuMigrationAnyFetchStats() - and it doesn't care for this behaviour. Drop the code to simplify the cleanup label. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
a70ae22cfd
commit
4e8bb57859
@ -3542,8 +3542,6 @@ int qemuMonitorJSONGetMigrationStats(qemuMonitor *mon,
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
if (ret < 0)
|
||||
memset(stats, 0, sizeof(*stats));
|
||||
virJSONValueFree(cmd);
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user