1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-14 16:45:20 +00:00

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

@ -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);