Free libusb_device and edev anyway, even if they should be exclusively set --- src/usb-backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/usb-backend.c b/src/usb-backend.c index ec0ae3e8..0b37274e 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -543,7 +543,8 @@ void spice_usb_backend_device_unref(SpiceUsbBackendDevice *dev) if (dev->libusb_device) { libusb_unref_device(dev->libusb_device); LOUD_DEBUG("%s freeing %p (libusb %p)", __FUNCTION__, dev, dev->libusb_device); - } else if (dev->edev) { + } + if (dev->edev) { device_ops(dev->edev)->delete(dev->edev); } g_free(dev); -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel