diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 62de67c9f9..fcc7c0ff7d 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1170,6 +1170,7 @@ int qemuDomainAttachHostDevice(struct qemud_driver *driver, if (usbDeviceListAdd(list, usb) < 0) { usbFreeDevice(usb); + usb = NULL: goto cleanup; }