mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
bhyve: use virDomainDiskDefNew to instead of VIR_ALLOC
Use the proper function to allocate a disk definition. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
0624ac3fa8
commit
84966103be
@ -430,10 +430,8 @@ bhyveParsePCIDisk(virDomainDefPtr def,
|
||||
int idx = -1;
|
||||
virDomainDiskDefPtr disk = NULL;
|
||||
|
||||
if (VIR_ALLOC(disk) < 0)
|
||||
if (!(disk = virDomainDiskDefNew(NULL)))
|
||||
goto cleanup;
|
||||
if (VIR_ALLOC(disk->src) < 0)
|
||||
goto error;
|
||||
|
||||
disk->bus = bus;
|
||||
disk->device = device;
|
||||
|
Loading…
Reference in New Issue
Block a user