mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
virDomainObjListNew: 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
bb3a57c8b0
commit
885ee2aa1f
@ -75,12 +75,8 @@ virDomainObjList *virDomainObjListNew(void)
|
||||
if (!(doms = virObjectRWLockableNew(virDomainObjListClass)))
|
||||
return NULL;
|
||||
|
||||
if (!(doms->objs = virHashNew(virObjectFreeHashData)) ||
|
||||
!(doms->objsName = virHashNew(virObjectFreeHashData))) {
|
||||
virObjectUnref(doms);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
doms->objs = virHashNew(virObjectFreeHashData);
|
||||
doms->objsName = virHashNew(virObjectFreeHashData);
|
||||
return doms;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user