From 4a40b9a4fd67b59c7cb4cea8441c64468845a378 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 6 Jul 2021 09:16:06 +0200 Subject: [PATCH] virNetworkObjNew: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnetworkobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 66f916c749..ea021892c7 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -118,8 +118,7 @@ virNetworkObjNew(void) virBitmapSetBitExpand(obj->classIdMap, 2) < 0) goto error; - if (!(obj->ports = virHashNew(virNetworkObjPortFree))) - goto error; + obj->ports = virHashNew(virNetworkObjPortFree); virObjectLock(obj);