mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virNodeDeviceObjListNew: 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
4a40b9a4fd
commit
3fab2688ac
@ -456,10 +456,7 @@ virNodeDeviceObjListNew(void)
|
||||
if (!(devs = virObjectRWLockableNew(virNodeDeviceObjListClass)))
|
||||
return NULL;
|
||||
|
||||
if (!(devs->objs = virHashNew(virObjectFreeHashData))) {
|
||||
virObjectUnref(devs);
|
||||
return NULL;
|
||||
}
|
||||
devs->objs = virHashNew(virObjectFreeHashData);
|
||||
|
||||
return devs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user