[spice-gtk,04/44] fixup! usb-redir: define interfaces to support emulated devices

Submitted by Frediano Ziglio on July 30, 2019, 12:02 p.m.

Details

Message ID 20190730120331.17967-5-fziglio@redhat.com
State Superseded
Headers show
Series "Follow ups for CD emulation patch series" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 30, 2019, 12:02 p.m.
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(-)

Patch hide | download patch | download mbox

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);