aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
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:21:05 +0800
commitd72e5a01c8bef2bbc3997de259d783ef8d92be4a (patch)
treeb7e41caf524b1f1af417b2c29890660dcf786b90 /libempathy-gtk
parent64a173ce325b9ba30079ce5b9f3bbe1615302ecb (diff)
downloadgsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar.gz
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar.bz2
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar.lz
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar.xz
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.tar.zst
gsoc2013-empathy-d72e5a01c8bef2bbc3997de259d783ef8d92be4a.zip
contact-chooser: fix TpfPersona leak
We weren't using the persona we just created for some reason.
Diffstat (limited to 'libempathy-gtk')
-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 7a9e7344d..5ff17a432 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -211,7 +211,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)
@@ -227,9 +227,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);
@@ -248,7 +249,7 @@ get_contacts_cb (TpConnection *connection,
NULL, NULL))
empathy_individual_view_select_first (self->priv->view);
- g_clear_object (&persona_new);
+ g_clear_object (&persona);
g_clear_object (&personas);
g_object_unref (store);
}