From: Peter Krempa Date: Tue, 21 Nov 2023 15:51:12 +0000 (+0100) Subject: qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error X-Git-Tag: v9.10.0-rc1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe42189d760a91dede82b06cfac77d4b799ff117;p=thirdparty%2Flibvirt.git qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error 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 --- 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;