[PATCH 2/3] qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit allowing hotplug of CDROMs moved the logic forbidding the hotplug
to the appropriate blocks based on the disk frontend but forgot to
actually bail out on such error.

Fixes: 3078799fef82d45ac10624e3bacded7a285d8a4f
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_hotplug.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 2d55d1d21e..80a39c159f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -944,6 +944,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver *driver,
         if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                            _("cdrom device with virtio bus isn't supported"));
+            goto cleanup;
         }
         if (qemuDomainEnsureVirtioAddress(&releaseVirtio, vm, dev) < 0)
             goto cleanup;
-- 
2.42.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux