[Telepathy-commits] [telepathy-glib/master] TpPresenceMixin: when filling contact attributes, don't leak a GValueArray
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Mar 4 09:07:53 PST 2009
---
telepathy-glib/presence-mixin.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index 979b6ef..f95b933 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -1379,19 +1379,15 @@ simple_presence_fill_contact_attributes_foreach (gpointer key,
TpPresenceStatus *status = (TpPresenceStatus *) value;
struct _i_absolutely_love_g_hash_table_foreach *data =
(struct _i_absolutely_love_g_hash_table_foreach *) user_data;
- GValue *val;
GValueArray *presence;
presence = construct_simple_presence_value_array (status,
data->supported_statuses);
- val = tp_g_value_slice_new (G_TYPE_VALUE_ARRAY);
- g_value_set_boxed (val, presence);
-
tp_contacts_mixin_set_contact_attribute (data->presence_hash,
handle,
TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE"/presence",
- val);
+ tp_g_value_slice_new_take_boxed (G_TYPE_VALUE_ARRAY, presence));
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list