[libvirt PATCH 24/38] virHashAtomicNew: `virHashNew` cannot return NULL

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

 



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

diff --git a/src/util/virhash.c b/src/util/virhash.c
index d2b591c0b7..a9996c9fc0 100644
--- a/src/util/virhash.c
+++ b/src/util/virhash.c
@@ -102,10 +102,7 @@ virHashAtomicNew(virHashDataFree dataFree)
     if (!(hash = virObjectLockableNew(virHashAtomicClass)))
         return NULL;
 
-    if (!(hash->hash = virHashNew(dataFree))) {
-        virObjectUnref(hash);
-        return NULL;
-    }
+    hash->hash = virHashNew(dataFree);
     return hash;
 }
 
-- 
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