[empathy] free the list returned by clutter_container_get_children()



commit f0f07ffc65b2b8f353262ee8e0f5e4cc535a9772
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Aug 2 14:56:06 2010 +0200

    free the list returned by clutter_container_get_children()

 src/empathy-map-view.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 2143f19..d266f65 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -347,13 +347,14 @@ map_view_key_press_cb (GtkWidget *widget,
 static gboolean
 map_view_tick (EmpathyMapView *window)
 {
-  GList *marker;
+  GList *marker, *l;
 
   marker = clutter_container_get_children (CLUTTER_CONTAINER (window->layer));
 
-  for (; marker; marker = marker->next)
-    map_view_contacts_update_label (marker->data);
+  for (l = marker; l != NULL; l = g_list_next (l))
+    map_view_contacts_update_label (l->data);
 
+  g_list_free (marker);
   return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]