Use virDomainDiskDefNew instead of VIR_ALLOC in qemuParseCommandLineDisk. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1510781 --- src/qemu/qemu_parse_command.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 533316385..c7c7bba03 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -658,10 +658,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, 0) < 0) return NULL; - if (VIR_ALLOC(def) < 0) + if (!(def = virDomainDiskDefNew(xmlopt))) goto cleanup; - if (VIR_ALLOC(def->src) < 0) - goto error; if (qemuDomainIsPSeries(dom)) def->bus = VIR_DOMAIN_DISK_BUS_SCSI; -- 2.14.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list