summaryrefslogtreecommitdiff
path: root/gtk/gtkcellview.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-02-06 22:25:01 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-02-06 22:25:01 +0000
commit738eeba8d684a848aeceba3919e81c964b99e5da (patch)
treeb4a9c6ef7145765f3336e1768d50f0f022bb24ae /gtk/gtkcellview.c
parente77b5747b2a80668e23805a9ed104c2f6a5a9d48 (diff)
downloadgdk-pixbuf-738eeba8d684a848aeceba3919e81c964b99e5da.tar.gz
Actually free the lists. Pointed out by Morten Welinder.
Fri Feb 6 23:08:29 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktextbtree.c (_gtk_text_btree_check): * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear_attributes): * gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes): Actually free the lists. Pointed out by Morten Welinder.
Diffstat (limited to 'gtk/gtkcellview.c')
-rw-r--r--gtk/gtkcellview.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 3ebd912a9..f7bb9dcba 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -682,7 +682,6 @@ gtk_cell_view_cell_layout_clear_attributes (GtkCellLayout *layout,
{
GtkCellViewCellInfo *info;
GtkCellView *cellview = GTK_CELL_VIEW (layout);
- GSList *list;
g_return_if_fail (GTK_IS_CELL_VIEW (cellview));
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
@@ -690,15 +689,8 @@ gtk_cell_view_cell_layout_clear_attributes (GtkCellLayout *layout,
info = gtk_cell_view_get_cell_info (cellview, renderer);
g_return_if_fail (info != NULL);
- list = info->attributes;
-
- while (list && list->next)
- {
- g_free (list->data);
- list = list->next->next;
- }
- g_slist_free (list);
-
+ g_slist_foreach (info->attributes, (GFunc)g_free, NULL);
+ g_slist_free (info->attributes);
info->attributes = NULL;
}