[libvirt PATCH 22/38] virDomainObjListNew: `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/virdomainobjlist.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index 5f9fd9aabc..43d09692a9 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -75,12 +75,8 @@ virDomainObjList *virDomainObjListNew(void)
     if (!(doms = virObjectRWLockableNew(virDomainObjListClass)))
         return NULL;
 
-    if (!(doms->objs = virHashNew(virObjectFreeHashData)) ||
-        !(doms->objsName = virHashNew(virObjectFreeHashData))) {
-        virObjectUnref(doms);
-        return NULL;
-    }
-
+    doms->objs = virHashNew(virObjectFreeHashData);
+    doms->objsName = virHashNew(virObjectFreeHashData);
     return doms;
 }
 
-- 
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