From aedef09bc900f485add3a9c387860e13d0e70816 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 13 Feb 2012 11:04:17 +0100 Subject: [PATCH] make sure the result object stays alive while renaming groups I started tracking this in Gabble so my unit test is living there. https://bugs.freedesktop.org/show_bug.cgi?id=45982 --- telepathy-glib/base-contact-list.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c index d10c575..411793d 100644 --- a/telepathy-glib/base-contact-list.c +++ b/telepathy-glib/base-contact-list.c @@ -4441,6 +4441,7 @@ emulate_rename_group_remove_cb (GObject *source, } g_simple_async_result_complete (rename_result); + g_object_unref (rename_result); } static void @@ -4457,9 +4458,11 @@ emulate_rename_group_add_cb (GObject *source, g_simple_async_result_set_from_error (rename_result, error); g_clear_error (&error); g_simple_async_result_complete (rename_result); + g_object_unref (rename_result); return; } + /* Pass ownership of rename_result to emulate_rename_group_remove_cb */ tp_base_contact_list_remove_group_async (self, g_simple_async_result_get_op_res_gpointer (rename_result), emulate_rename_group_remove_cb, rename_result); @@ -4492,9 +4495,9 @@ tp_base_contact_list_emulate_rename_group (TpBaseContactList *self, g_free); old_members = tp_base_contact_list_dup_group_members (self, old_name); + /* Pass ownership of result to emulate_rename_group_add_cb */ tp_base_contact_list_add_to_group_async (self, new_name, old_members, emulate_rename_group_add_cb, result); - g_object_unref (result); tp_handle_set_destroy (old_members); } -- 1.7.7.6