mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virDomainCCWAddressSetCreate: 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
1670b9116a
commit
f6252cf6b0
@ -1388,8 +1388,7 @@ virDomainCCWAddressSetCreate(void)
|
||||
|
||||
addrs = g_new0(virDomainCCWAddressSet, 1);
|
||||
|
||||
if (!(addrs->defined = virHashNew(g_free)))
|
||||
goto error;
|
||||
addrs->defined = virHashNew(g_free);
|
||||
|
||||
/* must use cssid = 0xfe (254) for virtio-ccw devices */
|
||||
addrs->next.cssid = 254;
|
||||
@ -1397,10 +1396,6 @@ virDomainCCWAddressSetCreate(void)
|
||||
addrs->next.devno = 0;
|
||||
addrs->next.assigned = 0;
|
||||
return addrs;
|
||||
|
||||
error:
|
||||
virDomainCCWAddressSetFree(addrs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user