[Spice-devel] [PATCH spice-gtk 1/2] Don't unref GAsyncResult in callback
Jonathon Jongsma
jjongsma at redhat.com
Thu May 31 18:35:19 UTC 2018
A GAsyncReadCallback function should not unref the GAsyncResult passed
to it as an argument since it does not hold a reference. This could
cause a double-free error (or a glib warning that it is not a valid
GObject)..
---
src/channel-usbredir.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index 0cc5630..b7445b0 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -151,7 +151,6 @@ static void _channel_reset_cb(GObject *gobject,
SPICE_CHANNEL_CLASS(spice_usbredir_channel_parent_class)->channel_reset(spice_channel, migrating);
spice_usbredir_channel_disconnect_device_finish(channel, result, &err);
- g_object_unref(result);
}
static void spice_usbredir_channel_reset(SpiceChannel *c, gboolean migrating)
--
2.14.3
More information about the Spice-devel
mailing list