Fix memory leaks caused by the failure to free the result of

Sun Dec 21 23:17:01 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkuimanager.c (update_node):
	(update_smart_separators):
	(_gtk_menu_is_empty):
	(find_menu_position):
	* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
	* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
	(gtk_combo_box_relayout): Fix memory leaks caused by the
	failure to free the result of gtk_container_get_children().
	(#127576, Yao Zhang)
This commit is contained in:
Matthias Clasen 2003-12-21 22:28:14 +00:00 committed by Matthias Clasen
parent d2e744ca52
commit 6a6455d7e3
8 changed files with 71 additions and 3 deletions

View File

@ -1,3 +1,14 @@
Sun Dec 21 23:17:01 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (update_node):
(update_smart_separators):
(_gtk_menu_is_empty):
(find_menu_position):
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
(gtk_combo_box_relayout): Fix memory leaks caused by the
failure to free the result of gtk_container_get_children().
Sun Dec 21 17:34:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right

View File

@ -1,3 +1,14 @@
Sun Dec 21 23:17:01 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (update_node):
(update_smart_separators):
(_gtk_menu_is_empty):
(find_menu_position):
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
(gtk_combo_box_relayout): Fix memory leaks caused by the
failure to free the result of gtk_container_get_children().
Sun Dec 21 17:34:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right

View File

@ -1,3 +1,14 @@
Sun Dec 21 23:17:01 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (update_node):
(update_smart_separators):
(_gtk_menu_is_empty):
(find_menu_position):
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
(gtk_combo_box_relayout): Fix memory leaks caused by the
failure to free the result of gtk_container_get_children().
Sun Dec 21 17:34:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right

View File

@ -1,3 +1,14 @@
Sun Dec 21 23:17:01 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (update_node):
(update_smart_separators):
(_gtk_menu_is_empty):
(find_menu_position):
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
(gtk_combo_box_relayout): Fix memory leaks caused by the
failure to free the result of gtk_container_get_children().
Sun Dec 21 17:34:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right

View File

@ -1,3 +1,14 @@
Sun Dec 21 23:17:01 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (update_node):
(update_smart_separators):
(_gtk_menu_is_empty):
(find_menu_position):
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_destroy):
* gtk/gtkcombobox.c (gtk_combo_box_relayout_item):
(gtk_combo_box_relayout): Fix memory leaks caused by the
failure to free the result of gtk_container_get_children().
Sun Dec 21 17:34:22 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Set the right

View File

@ -1484,6 +1484,7 @@ gtk_combo_box_relayout_item (GtkComboBox *combo_box,
list = gtk_container_get_children (GTK_CONTAINER (menu));
item = g_list_nth_data (list, index);
g_list_free (list);
gtk_combo_box_item_get_size (combo_box, index, &cols, &rows);
@ -1537,7 +1538,7 @@ gtk_combo_box_relayout (GtkComboBox *combo_box)
for (j = g_list_last (list); j; j = j->prev)
gtk_container_remove (GTK_CONTAINER (menu), j->data);
g_list_free (j);
g_list_free (list);
/* and relayout */
items = gtk_tree_model_iter_n_children (combo_box->priv->model, NULL);
@ -2131,6 +2132,7 @@ gtk_combo_box_cell_layout_clear (GtkCellLayout *layout)
gtk_cell_layout_clear (GTK_CELL_LAYOUT (view));
}
g_list_free (list);
}
}

View File

@ -11421,9 +11421,14 @@ static void
gtk_tree_view_search_dialog_destroy (GtkWidget *search_dialog,
GtkTreeView *tree_view)
{
GtkEntry *entry = (GtkEntry *)(gtk_container_get_children (GTK_CONTAINER (search_dialog)))->data;
GList *list;
GtkEntry *entry;
gint *selected_iter;
list = gtk_container_get_children (GTK_CONTAINER (search_dialog));
entry = (GtkEntry *)list->data;
g_list_free (list);
if (tree_view->priv->disable_popdown)
return;

View File

@ -1537,6 +1537,7 @@ find_menu_position (GNode *node,
pos = 1;
else
pos = 0;
g_list_free (siblings);
break;
case NODE_TYPE_MENU_PLACEHOLDER:
menushell = gtk_widget_get_parent (NODE_INFO (parent)->proxy);
@ -1677,6 +1678,7 @@ _gtk_menu_is_empty (GtkWidget *menu)
}
cur = cur->next;
}
g_list_free (children);
return TRUE;
}
@ -1777,6 +1779,8 @@ update_smart_separators (GtkWidget *proxy)
if (GTK_IS_WIDGET (filler))
g_object_set (G_OBJECT (filler), "visible", empty, NULL);
}
g_list_free (children);
}
}
@ -1865,6 +1869,7 @@ update_node (GtkUIManager *self,
g_object_set (G_OBJECT (siblings->data),
"visible", self->private_data->add_tearoffs && !in_popup,
NULL);
g_list_free (siblings);
}
goto recurse_children;
@ -1946,10 +1951,11 @@ update_node (GtkUIManager *self,
g_object_set (G_OBJECT (siblings->data),
"visible", self->private_data->add_tearoffs && !in_popup,
NULL);
g_list_free (siblings);
}
break;
case NODE_TYPE_UNDECIDED:
g_warning ("found 'undecided node!");
g_warning ("found undecided node!");
break;
case NODE_TYPE_ROOT:
break;