diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-12 18:25:24 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-12 20:15:02 +0800 |
commit | 0dea719d7f81bd79e89e8bc92e65b12b9caf06a5 (patch) | |
tree | f47f0c51de30820c734d7f340a789ffc4a3faf8e /libempathy-gtk | |
parent | b8863f14395f0e9e3201dd8bd2ffee938e7a50c9 (diff) | |
download | gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar.gz gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar.bz2 gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar.lz gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar.xz gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.tar.zst gsoc2013-empathy-0dea719d7f81bd79e89e8bc92e65b12b9caf06a5.zip |
filter_groups: don't leak the widgets list
https://bugzilla.gnome.org/show_bug.cgi?id=683864
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | 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 a5d145943..d1e1c7891 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 |