GNOME Bugzilla – Bug 660985
memory leak in clutter_box_layout.c
Last modified: 2011-10-07 11:13:42 UTC
Created attachment 198336 [details] [review] fix memory leak in clutter_box_layout.c In Clutter version 1.8.0, there is memory leak in count_expand_children(), clutter_box_layout_allocate() in clutter-box-layout.c. The children list from clutter_container_get_children() must be freed with g_list_free().
Review of attachment 198336 [details] [review]: thanks for catching this. for the next iteration, could you please use a git formatted patch? it makes it easier to handle attribution. ::: clutter-1.8.0.orig/clutter/clutter-box-layout.c @@ +755,3 @@ *visible_children = *expand_children = 0; + for (n_children = children = clutter_container_get_children (container); I wouldn't use the double assignment; the common pattern to do this in Clutter, as well as other G* code, is: GList *children, *l; children = clutter_container_get_children (container); for (l = children; l != NULL; l = l->next) { ClutterActor *child = l->data; } g_list_free (children);
Created attachment 198508 [details] [review] Plug memory leaks in clutter_box_layout.c (git formatted patch)
Review of attachment 198508 [details] [review]: looks good to me.
attachment 198508 [details] [review] pushed to master