[Spice-devel] [spice-gtk v2 2/3] win-usb-dev: let _finalize() do libusb_exit()
Victor Toso
victortoso at redhat.com
Tue Nov 15 13:33:15 UTC 2016
From: Victor Toso <me at victortoso.com>
This fixes a hang in mingw-spice-gtk when the GUdevClient fails to
initialize due to problems in the UsbDk installation.
Before this patch, libusb_exit() was being called twice:
- At g_udev_client_initable_init(), after failure with priv->ctx as
argument
- At g_udev_client_finalize() as g_udev_client_initable_init() failure
implies the object failed to initialize and it is terminated. Here
it was being called with NULL as priv->ctx was set to NULL in
g_udev_client_initable_init()
Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=98686
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau 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