[libvirt PATCH 23/38] virFileCacheNew: `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/virfilecache.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c
index 2f55deefb6..64348dc1e6 100644
--- a/src/util/virfilecache.c
+++ b/src/util/virfilecache.c
@@ -242,8 +242,7 @@ virFileCacheNew(const char *dir,
     if (!(cache = virObjectNew(virFileCacheClass)))
         return NULL;
 
-    if (!(cache->table = virHashNew(virObjectFreeHashData)))
-        goto cleanup;
+    cache->table = virHashNew(virObjectFreeHashData);
 
     cache->dir = g_strdup(dir);
 
@@ -252,10 +251,6 @@ virFileCacheNew(const char *dir,
     cache->handlers = *handlers;
 
     return cache;
-
- cleanup:
-    virObjectUnref(cache);
-    return NULL;
 }
 
 
-- 
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