aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-04 20:42:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-08 17:22:34 +0800
commite3588d1344ac6d964396c75f2f3cd5c2501b500c (patch)
tree00659defbf1021c76b428034089d7789a3854535
parentfd0c17ddf662f5de04d33acaea778d7ffebbdfaf (diff)
downloadgsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar.gz
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar.bz2
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar.lz
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar.xz
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.tar.zst
gsoc2013-empathy-e3588d1344ac6d964396c75f2f3cd5c2501b500c.zip
contact-chooser: fix TpfPersona leak
We weren't using the persona we just created for some reason.
-rw-r--r--libempathy-gtk/empathy-contact-chooser.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index 4a4f9f4a0..dbc694112 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -199,7 +199,7 @@ get_contacts_cb (TpConnection *connection,
TpAccount *account;
TpfPersonaStore *store;
FolksIndividual *individual;
- TpfPersona *persona_new;
+ TpfPersona *persona;
GeeSet *personas;
if (self->priv->add_temp_ctx != ctx)
@@ -215,9 +215,10 @@ get_contacts_cb (TpConnection *connection,
personas = GEE_SET (
gee_hash_set_new (FOLKS_TYPE_PERSONA, g_object_ref, g_object_unref,
g_direct_hash, g_direct_equal));
- persona_new = tpf_persona_new (contacts[0], store);
- gee_collection_add (GEE_COLLECTION (personas),
- tpf_persona_new (contacts[0], store));
+
+ persona = tpf_persona_new (contacts[0], store);
+
+ gee_collection_add (GEE_COLLECTION (personas), persona);
individual = folks_individual_new (personas);
@@ -230,7 +231,7 @@ get_contacts_cb (TpConnection *connection,
individual_store_add_individual_and_connect (self->priv->store, individual);
- g_clear_object (&persona_new);
+ g_clear_object (&persona);
g_clear_object (&personas);
g_object_unref (store);
}