mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virStorageVolObjListNew: 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
cc69362e36
commit
7b8d4d99b5
@ -170,12 +170,9 @@ virStorageVolObjListNew(void)
|
||||
if (!(vols = virObjectRWLockableNew(virStorageVolObjListClass)))
|
||||
return NULL;
|
||||
|
||||
if (!(vols->objsKey = virHashNew(virObjectFreeHashData)) ||
|
||||
!(vols->objsName = virHashNew(virObjectFreeHashData)) ||
|
||||
!(vols->objsPath = virHashNew(virObjectFreeHashData))) {
|
||||
virObjectUnref(vols);
|
||||
return NULL;
|
||||
}
|
||||
vols->objsKey = virHashNew(virObjectFreeHashData);
|
||||
vols->objsName = virHashNew(virObjectFreeHashData);
|
||||
vols->objsPath = virHashNew(virObjectFreeHashData);
|
||||
|
||||
return vols;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user