summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog3
-rw-r--r--ChangeLog.pre-2-103
-rw-r--r--ChangeLog.pre-2-43
-rw-r--r--ChangeLog.pre-2-63
-rw-r--r--ChangeLog.pre-2-83
-rw-r--r--gtk/gtkcellview.c12
-rw-r--r--gtk/gtkcombobox.c11
-rw-r--r--gtk/gtktextbtree.c9
8 files changed, 18 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 95158a9d0..170ea80b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-Fri Feb 6 22:56:05 2004 Matthias Clasen <maclas@gmx.de>
+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.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 95158a9d0..170ea80b4 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,6 @@
-Fri Feb 6 22:56:05 2004 Matthias Clasen <maclas@gmx.de>
+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.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 95158a9d0..170ea80b4 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,5 +1,6 @@
-Fri Feb 6 22:56:05 2004 Matthias Clasen <maclas@gmx.de>
+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.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 95158a9d0..170ea80b4 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,5 +1,6 @@
-Fri Feb 6 22:56:05 2004 Matthias Clasen <maclas@gmx.de>
+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.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 95158a9d0..170ea80b4 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,6 @@
-Fri Feb 6 22:56:05 2004 Matthias Clasen <maclas@gmx.de>
+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.
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;
}
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 2534ac84e..eb1918c40 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2258,7 +2258,6 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout,
ComboCellInfo *info;
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
GtkWidget *menu;
- GSList *list;
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
@@ -2266,14 +2265,8 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout,
info = gtk_combo_box_get_cell_info (combo_box, cell);
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;
if (combo_box->priv->cell_view)
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index f9c08fe11..6d340a74a 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -6698,15 +6698,15 @@ _gtk_text_btree_check (GtkTextBTree *tree)
GtkTextLine *line;
GtkTextLineSegment *seg;
GtkTextTag *tag;
- GSList *taglist = NULL;
+ GSList *all_tags, *taglist = NULL;
int count;
GtkTextTagInfo *info;
/*
* Make sure that the tag toggle counts and the tag root pointers are OK.
*/
- for (taglist = list_of_tags (tree->table);
- taglist != NULL ; taglist = taglist->next)
+ all_tags = list_of_tags (tree->table);
+ for (taglist = all_tags; taglist != NULL ; taglist = taglist->next)
{
tag = taglist->data;
info = gtk_text_btree_get_existing_tag_info (tree, tag);
@@ -6790,8 +6790,7 @@ _gtk_text_btree_check (GtkTextBTree *tree)
}
}
- g_slist_free (taglist);
- taglist = NULL;
+ g_slist_free (all_tags);
/*
* Call a recursive procedure to do the main body of checks.