[Spice-devel] [PATCH spice-gtk 04/44] fixup! usb-redir: define interfaces to support emulated devices
Frediano Ziglio
fziglio at redhat.com
Tue Jul 30 12:02:53 UTC 2019
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
More information about the Spice-devel
mailing list