virNetworkObjNew: virHashNew cannot return NULL

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-06 09:16:06 +02:00
parent 5f4e80d174
commit 4a40b9a4fd

View File

@ -118,8 +118,7 @@ virNetworkObjNew(void)
virBitmapSetBitExpand(obj->classIdMap, 2) < 0) virBitmapSetBitExpand(obj->classIdMap, 2) < 0)
goto error; goto error;
if (!(obj->ports = virHashNew(virNetworkObjPortFree))) obj->ports = virHashNew(virNetworkObjPortFree);
goto error;
virObjectLock(obj); virObjectLock(obj);