From 6c7d3bb978f03da13cfc6dbef4d4a5b034283ce1 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 27 Apr 2011 11:02:20 +0100 Subject: Don't leak the account and entity --- libempathy-gtk/empathy-log-window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libempathy-gtk') 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 -- cgit v1.2.3