commit ad74940243a72afcbd02f03e21842b7a34f5a5ae Author: Nicolas Dufresne Date: Thu Dec 10 16:49:37 2009 -0500 Don't unref result when establish_session completes The result is expected to be valid in wocky_connector_*_finish function. Type checking was preventing most crash, but a missing ref leads to a crash when connector was destroyed while connecting. See bugs.fd.o #25538 Signed-off-by: Nicolas Dufresne diff --git a/wocky/wocky-connector.c b/wocky/wocky-connector.c index a863a45..6160fc6 100644 --- a/wocky/wocky-connector.c +++ b/wocky/wocky-connector.c @@ -2444,7 +2444,6 @@ establish_session_recv_cb (GObject *source, WockyXmppNode *node = NULL; const char *tag = NULL; WockyConnectorError code; - GSimpleAsyncResult *tmp; case WOCKY_STANZA_SUB_TYPE_ERROR: node = wocky_xmpp_node_get_child (reply->node, "error"); @@ -2473,11 +2472,7 @@ establish_session_recv_cb (GObject *source, xep77_begin (self); } else - { - tmp = priv->result; - g_simple_async_result_complete (tmp); - g_object_unref (tmp); - } + g_simple_async_result_complete (priv->result); break; default: