提交 994c49ac 编写于 作者: P Peter Krempa

qemu: parse: Allocate disk definition with private data

Use virDomainDiskDefNew instead of VIR_ALLOC in
qemuParseCommandLineDisk.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1510781
上级 9249187f
...@@ -658,10 +658,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, ...@@ -658,10 +658,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
0) < 0) 0) < 0)
return NULL; return NULL;
if (VIR_ALLOC(def) < 0) if (!(def = virDomainDiskDefNew(xmlopt)))
goto cleanup; goto cleanup;
if (VIR_ALLOC(def->src) < 0)
goto error;
if (qemuDomainIsPSeries(dom)) if (qemuDomainIsPSeries(dom))
def->bus = VIR_DOMAIN_DISK_BUS_SCSI; def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册