mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
virStoragePoolObjListNew: virHashNew
cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
a16e4dd751
commit
cd6ec91705
@ -398,11 +398,8 @@ virStoragePoolObjListNew(void)
|
||||
if (!(pools = virObjectRWLockableNew(virStoragePoolObjListClass)))
|
||||
return NULL;
|
||||
|
||||
if (!(pools->objs = virHashNew(virObjectFreeHashData)) ||
|
||||
!(pools->objsName = virHashNew(virObjectFreeHashData))) {
|
||||
virObjectUnref(pools);
|
||||
return NULL;
|
||||
}
|
||||
pools->objs = virHashNew(virObjectFreeHashData);
|
||||
pools->objsName = virHashNew(virObjectFreeHashData);
|
||||
|
||||
return pools;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user