aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-invite-participant-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-17 16:06:50 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-18 21:40:10 +0800
commit259126957650f1c28abdbc101636fe5cbca03f48 (patch)
tree267627303d0ca269539cf032ad8024fbf5ddb00f /src/empathy-invite-participant-dialog.c
parentfa5df0324942721999ae2dd7ad8425379fbc59c9 (diff)
downloadgsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar.gz
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar.bz2
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar.lz
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar.xz
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.tar.zst
gsoc2013-empathy-259126957650f1c28abdbc101636fe5cbca03f48.zip
filter_func: don't leak individual
Diffstat (limited to 'src/empathy-invite-participant-dialog.c')
-rw-r--r--src/empathy-invite-participant-dialog.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/empathy-invite-participant-dialog.c b/src/empathy-invite-participant-dialog.c
index bdae6bf82..379b23121 100644
--- a/src/empathy-invite-participant-dialog.c
+++ b/src/empathy-invite-participant-dialog.c
@@ -167,7 +167,7 @@ filter_func (GtkTreeModel *model,
TpContact *contact;
gboolean is_online;
GList *members, *l;
- gboolean display;
+ gboolean display = FALSE;
TpChannel *channel;
gtk_tree_model_get (model, iter,
@@ -176,13 +176,14 @@ filter_func (GtkTreeModel *model,
-1);
if (individual == NULL || !is_online)
- return FALSE;
+ goto out;
/* Filter out individuals not having a persona on the same connection as the
* EmpathyTpChat. */
contact = get_tp_contact_for_chat (self, individual);
+
if (contact == NULL)
- return FALSE;
+ goto out;
/* Filter out contacts which are already in the chat */
members = empathy_contact_list_get_members (EMPATHY_CONTACT_LIST (
@@ -212,6 +213,8 @@ filter_func (GtkTreeModel *model,
g_list_foreach (members, (GFunc) g_object_unref, NULL);
g_list_free (members);
+out:
+ tp_clear_object (&individual);
return display;
}