提交 84966103 编写于 作者: P Peter Krempa

bhyve: use virDomainDiskDefNew to instead of VIR_ALLOC

Use the proper function to allocate a disk definition.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 0624ac3f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册