提交 9985679c 编写于 作者: J Ján Tomko

Remove VIR_STRDUP usage that snuck in

Fixes: 224d269fSigned-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 54dd0938
...@@ -12843,8 +12843,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def, ...@@ -12843,8 +12843,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
if (!usb) if (!usb)
goto cleanup; goto cleanup;
if (VIR_STRDUP(tmpPath, virUSBDeviceGetPath(usb)) < 0) tmpPath = g_strdup(virUSBDeviceGetPath(usb));
goto cleanup;
perm = VIR_CGROUP_DEVICE_RW; perm = VIR_CGROUP_DEVICE_RW;
break; break;
...@@ -12865,8 +12864,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def, ...@@ -12865,8 +12864,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
if (!scsi) if (!scsi)
goto cleanup; goto cleanup;
if (VIR_STRDUP(tmpPath, virSCSIDeviceGetPath(scsi)) < 0) tmpPath = g_strdup(virSCSIDeviceGetPath(scsi));
goto cleanup;
perm = virSCSIDeviceGetReadonly(scsi) ? perm = virSCSIDeviceGetReadonly(scsi) ?
VIR_CGROUP_DEVICE_READ : VIR_CGROUP_DEVICE_RW; VIR_CGROUP_DEVICE_READ : VIR_CGROUP_DEVICE_RW;
} }
...@@ -12878,8 +12876,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def, ...@@ -12878,8 +12876,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
if (!(host = virSCSIVHostDeviceNew(hostsrc->wwpn))) if (!(host = virSCSIVHostDeviceNew(hostsrc->wwpn)))
goto cleanup; goto cleanup;
if (VIR_STRDUP(tmpPath, virSCSIVHostDeviceGetPath(host)) < 0) tmpPath = g_strdup(virSCSIVHostDeviceGetPath(host));
goto cleanup;
perm = VIR_CGROUP_DEVICE_RW; perm = VIR_CGROUP_DEVICE_RW;
} }
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册