[libvirt PATCH 25/38] virInterfaceObjListNew: `virHashNew` cannot return NULL

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/virinterfaceobj.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c
index c8fda4990f..a73208f1fc 100644
--- a/src/conf/virinterfaceobj.c
+++ b/src/conf/virinterfaceobj.c
@@ -142,10 +142,7 @@ virInterfaceObjListNew(void)
     if (!(interfaces = virObjectRWLockableNew(virInterfaceObjListClass)))
         return NULL;
 
-    if (!(interfaces->objsName = virHashNew(virObjectFreeHashData))) {
-        virObjectUnref(interfaces);
-        return NULL;
-    }
+    interfaces->objsName = virHashNew(virObjectFreeHashData);
 
     return interfaces;
 }
-- 
2.31.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