]> git.0d.be Git - empathy.git/commitdiff
filter_groups: don't leak the widgets list
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 12 Sep 2012 10:25:24 +0000 (12:25 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 12 Sep 2012 12:15:02 +0000 (14:15 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=683864

libempathy-gtk/empathy-roster-view.c

index a5d145943803aa7408ba2eb50389a82308b9b70f..d1e1c7891cd74acfd1ef0980c1813fbebf1e7da0 100644 (file)
@@ -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