From fe42189d760a91dede82b06cfac77d4b799ff117 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 21 Nov 2023 16:51:12 +0100 Subject: [PATCH] qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- 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;