The function cannot fail once it starts populating
ret->params.params_val[i].field.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/remote/remote_daemon_dispatch.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index 6cf88e22c3..16bb23f049 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -3309,11 +3309,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;
@@ -3376,11 +3371,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;
--
2.39.1