aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-log-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-27 18:02:20 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-27 18:25:51 +0800
commit24bd206a5894fb2fb9ba48e32d92d088fd365955 (patch)
treefded59b99797b5a186303233be0204bf6cb8746b /libempathy-gtk/empathy-log-window.c
parent7e9ee1f899ced5bc373b73af8486b9e7cf0ed160 (diff)
downloadgsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar.gz
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar.bz2
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar.lz
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar.xz
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.tar.zst
gsoc2013-empathy-24bd206a5894fb2fb9ba48e32d92d088fd365955.zip
Don't leak the account and entity
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r--libempathy-gtk/empathy-log-window.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 4d2b79b8e..60abae2c0 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1027,6 +1027,7 @@ model_has_entity (GtkTreeModel *model,
TplLogSearchHit *hit = data;
TplEntity *e;
TpAccount *a;
+ gboolean ret = FALSE;
gtk_tree_model_get (model, iter,
COL_WHO_TARGET, &e,
@@ -1036,11 +1037,13 @@ model_has_entity (GtkTreeModel *model,
if (e != NULL && entity_equal (hit->target, e) &&
a != NULL && account_equal (hit->account, a))
{
- has_element = TRUE;
- return TRUE;
+ ret = has_element = TRUE;
}
- return FALSE;
+ tp_clear_object (&e);
+ tp_clear_object (&a);
+
+ return ret;
}
static gboolean