[libvirt PATCH 4/4] remote: Drop useless cleanup in remoteDispatchNodeGet{CPU, Memory}Stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function cannot fail once it starts populating
ret->params.params_val[i].field.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux