[Spice-devel] [spice-gtk 1/2] Revert "channel-usbredir: Fix crash due to a Task returning earlier than expected"
Fabiano FidĂȘncio
fidencio at redhat.com
Wed Mar 23 09:48:30 UTC 2016
This reverts commit 7774b8c0dd85ce2bb311d8bbe1c25deb73970b6e.
The crash was fixed, but not properly. GTask shouldn't return
immediately in that scenario. Next patch brings a proper fix for the
issue.
Signed-off-by: Fabiano FidĂȘncio <fidencio at redhat.com>
---
src/channel-usbredir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index ab90800..0f76126 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -296,12 +296,12 @@ static void spice_usbredir_channel_open_acl_cb(
spice_usbredir_channel_open_device(channel, &err);
}
if (err) {
+ g_task_return_error(priv->task, err);
libusb_unref_device(priv->device);
priv->device = NULL;
g_boxed_free(spice_usb_device_get_type(), priv->spice_device);
priv->spice_device = NULL;
priv->state = STATE_DISCONNECTED;
- g_task_return_error(priv->task, err);
} else {
g_task_return_boolean(priv->task, TRUE);
}
--
2.5.5
More information about the Spice-devel
mailing list