mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
remote: Drop useless cleanup in remoteDispatchNodeGet{CPU,Memory}Stats
The function cannot fail once it starts populating ret->params.params_val[i].field. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d0f339170f
commit
1cf7e6ec05
@ -3310,11 +3310,6 @@ remoteDispatchNodeGetCPUStats(virNetServer *server G_GNUC_UNUSED,
|
||||
cleanup:
|
||||
if (rv < 0) {
|
||||
virNetMessageSaveError(rerr);
|
||||
if (ret->params.params_val) {
|
||||
for (i = 0; i < nparams; i++)
|
||||
VIR_FREE(ret->params.params_val[i].field);
|
||||
VIR_FREE(ret->params.params_val);
|
||||
}
|
||||
}
|
||||
VIR_FREE(params);
|
||||
return rv;
|
||||
@ -3377,11 +3372,6 @@ remoteDispatchNodeGetMemoryStats(virNetServer *server G_GNUC_UNUSED,
|
||||
cleanup:
|
||||
if (rv < 0) {
|
||||
virNetMessageSaveError(rerr);
|
||||
if (ret->params.params_val) {
|
||||
for (i = 0; i < nparams; i++)
|
||||
VIR_FREE(ret->params.params_val[i].field);
|
||||
VIR_FREE(ret->params.params_val);
|
||||
}
|
||||
}
|
||||
VIR_FREE(params);
|
||||
return rv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user