From 3507a196e2f72a1693c24f03339260ba52d0e195 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Thu, 31 Mar 2011 11:05:50 +0100 Subject: meta-porter: unref async result after calling a method on the source object Signed-off-by: Jonny Lamb --- wocky/wocky-meta-porter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wocky/wocky-meta-porter.c b/wocky/wocky-meta-porter.c index cd68354..f203772 100644 --- a/wocky/wocky-meta-porter.c +++ b/wocky/wocky-meta-porter.c @@ -1407,10 +1407,12 @@ meta_porter_send_iq_cb (GObject *source_object, g_simple_async_result_set_op_res_gpointer (simple, stanza, g_object_unref); g_simple_async_result_complete (simple); - g_object_unref (simple); wocky_meta_porter_unhold (data->self, data->contact); + /* unref simple here as we depend on it holding potentially the last + * ref on self */ + g_object_unref (data->simple); g_object_unref (data->contact); g_slice_free (SendIQData, data); } -- cgit v1.2.3