[empathy] filter_groups: don't leak the widgets list
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] filter_groups: don't leak the widgets list
- Date: Wed, 12 Sep 2012 13:35:24 +0000 (UTC)
commit 0dea719d7f81bd79e89e8bc92e65b12b9caf06a5
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Sep 12 12:25:24 2012 +0200
filter_groups: don't leak the widgets list
https://bugzilla.gnome.org/show_bug.cgi?id=683864
libempathy-gtk/empathy-roster-view.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index a5d1459..d1e1c78 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -907,6 +907,7 @@ filter_group (EmpathyRosterView *self,
EmpathyRosterGroup *group)
{
GList *widgets, *l;
+ gboolean result = FALSE;
/* Display the group if it contains at least one displayed contact */
widgets = empathy_roster_group_get_widgets (group);
@@ -915,10 +916,15 @@ filter_group (EmpathyRosterView *self,
EmpathyRosterContact *contact = l->data;
if (contact_should_be_displayed (self, contact))
- return TRUE;
+ {
+ result = TRUE;
+ break;
+ }
}
- return FALSE;
+ g_list_free (widgets);
+
+ return result;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]