There's a could qemu hotplug implementations that are missing drive_del calls in their failure cleanup paths. The good example to follow is 1) src/qemu/qemu_hotplug.c: qemuDomainAttachSCSIDisk. It has a comment about missing drive_del, but drive_del has been around for a while. That comment and warning should be replaced with the logic from the failadddevice: label from qemuDomainAttachVirtioDiskDevice 2) src/qemu/qemu_hotplug.c: qemuDomainAttachUSBMassStorageDevice. The error pattern here should be updated to match what qemuDomainAttachVirtioDiskDevice does, which is a bit of a larger rework. In fact, I think most of the disk hotplug code could be unified now to be shared between the three methods, since they all use the same monitor commands
Changes pushed upstream : USB: commit id '190e22c06ba7e4b38e7690a7ef2ae4fc423a0b38' SCSI: commit id '97ca6eed9a08d083cfc0428ddc30c2fb5ac2f3dd'
Closing right now as it would probably be forgotten until next release.