diff -rup ../telepathy-gabble-orig/src/gabble-connection.c ./src/gabble-connection.c --- ../telepathy-gabble-orig/src/gabble-connection.c 2006-12-11 20:12:08.000000000 +0100 +++ ./src/gabble-connection.c 2007-01-11 13:52:58.000000000 +0100 @@ -4274,7 +4274,7 @@ _request_avatar_cb (GabbleVCardManager * if (NULL == vcard) { dbus_g_method_return_error (context, vcard_error); - return; + goto out; } photo_node = lm_message_node_get_child (vcard, "PHOTO"); @@ -4285,7 +4285,7 @@ _request_avatar_cb (GabbleVCardManager * "contact vCard has no photo"); dbus_g_method_return_error (context, error); g_error_free (error); - return; + goto out; } type_node = lm_message_node_get_child (photo_node, "TYPE"); @@ -4296,7 +4296,7 @@ _request_avatar_cb (GabbleVCardManager * "contact avatar is missing type node"); dbus_g_method_return_error (context, error); g_error_free (error); - return; + goto out; } binval_node = lm_message_node_get_child (photo_node, "BINVAL"); @@ -4307,7 +4307,7 @@ _request_avatar_cb (GabbleVCardManager * "contact avatar is missing binval node"); dbus_g_method_return_error (context, error); g_error_free (error); - return; + goto out; } avatar = base64_decode (lm_message_node_get_value (binval_node)); @@ -4359,7 +4359,7 @@ _request_avatar_cb (GabbleVCardManager * g_signal_emit (conn, signals[AVATAR_UPDATED], 0, handle, sha1); } - return; + goto out; } g_free (sha1); @@ -4370,6 +4370,9 @@ _request_avatar_cb (GabbleVCardManager * g_array_append_vals (arr, avatar->str, avatar->len); dbus_g_method_return (context, arr, mime_type); g_array_free (arr, TRUE); + +out: + g_object_unref (conn); } /**