[Spice-devel] [spice-gtk v1 4/5] win-usb-dev: Let finalize do libusb_exit()

Victor Toso victortoso at redhat.com
Mon Nov 14 23:26:54 UTC 2016


From: Victor Toso <me at victortoso.com>

This fixes a hanging on mingw-spice-gtk when the GUdevClient fails to
initialize due problems in the UsbDk installation.

The libusb_exit() will be called on priv->ctx in
g_udev_client_initable_init() and also it will be called on NULL at
g_udev_client_finalize(), making the application hang on
initialization.

Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=98686
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/win-usb-dev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
index 4b95b2d..5e5bb4d 100644
--- a/src/win-usb-dev.c
+++ b/src/win-usb-dev.c
@@ -232,9 +232,6 @@ g_udev_client_initable_init(GInitable *initable, GCancellable *cancellable,
  g_udev_client_init_failed_unreg:
     UnregisterClass(G_UDEV_CLIENT_WINCLASS_NAME, NULL);
  g_udev_client_init_failed:
-    libusb_exit(priv->ctx);
-    priv->ctx = NULL;
-
     return FALSE;
 }
 
-- 
2.9.3



More information about the Spice-devel mailing list