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;
|
int idx = -1;
|
||||||
virDomainDiskDefPtr disk = NULL;
|
virDomainDiskDefPtr disk = NULL;
|
||||||
|
|
||||||
if (VIR_ALLOC(disk) < 0)
|
if (!(disk = virDomainDiskDefNew(NULL)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (VIR_ALLOC(disk->src) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
disk->bus = bus;
|
disk->bus = bus;
|
||||||
disk->device = device;
|
disk->device = device;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user