aboutsummaryrefslogtreecommitdiffstats
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-06-09 19:34:56 +0800
commit6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1 (patch)
tree18f7f4b30da88e2274e477ee548ff235e47c7e31
parente391423b415ea591dfd9c306508330e4d2be5484 (diff)
downloadgsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar.gz
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar.bz2
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar.lz
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar.xz
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.tar.zst
gsoc2013-empathy-6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1.zip
Don't leak the account and entity
-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 0066c9b0a..516881825 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1031,6 +1031,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,
@@ -1040,11 +1041,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