diff options
author | Stef Walter <stefw@collaora.co.uk> | 2011-03-30 15:49:46 +0200 |
---|---|---|
committer | Stef Walter <stefw@collaora.co.uk> | 2011-03-30 15:49:46 +0200 |
commit | 035616a57f7e13d372717aa8d85b7df018e47344 (patch) | |
tree | 849d34c7b2e1b39e7ef9b7de695ea974bd790c87 /telepathy-ytstenut-glib | |
parent | 35118097149a04d4d3ef0cde5277bd06dc93de3d (diff) |
Don't leak the channel request.
Diffstat (limited to 'telepathy-ytstenut-glib')
-rw-r--r-- | telepathy-ytstenut-glib/client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/telepathy-ytstenut-glib/client.c b/telepathy-ytstenut-glib/client.c index 71b64db..b03a6df 100644 --- a/telepathy-ytstenut-glib/client.c +++ b/telepathy-ytstenut-glib/client.c @@ -359,15 +359,17 @@ tp_yts_client_accept_channel (TpYtsClient *self) } static void -on_channel_request_create_and_handle_channel_returned (GObject *source_object, +on_channel_request_create_and_handle_channel_returned (GObject *source, GAsyncResult *result, gpointer user_data) { GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data); + TpAccountChannelRequest *channel_request = + TP_ACCOUNT_CHANNEL_REQUEST (source); TpChannel *channel; GError *error = NULL; channel = tp_account_channel_request_create_and_handle_channel_finish ( - TP_ACCOUNT_CHANNEL_REQUEST (source_object), result, NULL, &error); + channel_request, result, NULL, &error); if (error == NULL) { g_simple_async_result_set_op_res_gpointer (res, channel, g_object_unref); @@ -379,6 +381,7 @@ on_channel_request_create_and_handle_channel_returned (GObject *source_object, } g_simple_async_result_complete (res); + g_object_unref (channel_request); } /** |