[libvirt PATCH 2/2] udevConnectListAllInterfaces: delete pointless cleanup code

Ján Tomko jtomko at redhat.com
Fri Nov 20 13:13:59 UTC 2020


We only jump to cleanup before allocating any lists.

Drop the dead code.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/interface/interface_backend_udev.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 31246dde74..351584ddf3 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -405,14 +405,6 @@ udevConnectListAllInterfaces(virConnectPtr conn,
     if (enumerate)
         udev_enumerate_unref(enumerate);
     udev_unref(udev);
-
-    if (ifaces) {
-        for (tmp_count = 0; tmp_count < count; tmp_count++)
-            virObjectUnref(ifaces_list[tmp_count]);
-    }
-
-    VIR_FREE(ifaces_list);
-
     return ret;
 
 }
-- 
2.26.2




More information about the libvir-list mailing list