virNWFilterBindingObjListNew: 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 10:15:45 +02:00
parent ac184eea7c
commit 0609995d43

View File

@ -66,10 +66,7 @@ virNWFilterBindingObjListNew(void)
if (!(bindings = virObjectRWLockableNew(virNWFilterBindingObjListClass)))
return NULL;
if (!(bindings->objs = virHashNew(virObjectFreeHashData))) {
virObjectUnref(bindings);
return NULL;
}
bindings->objs = virHashNew(virObjectFreeHashData);
return bindings;
}