Fix a memory leak. (#321032, Peter Zelezny)

* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
	leak.  (#321032, Peter Zelezny)
This commit is contained in:
Matthias Clasen 2005-11-15 15:38:53 +00:00
parent 1500848841
commit f3f1bdc2f0
3 changed files with 16 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
leak. (#321032, Peter Zelezny)
2005-11-15 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy

View File

@ -1,3 +1,8 @@
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
leak. (#321032, Peter Zelezny)
2005-11-15 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy

View File

@ -2258,7 +2258,6 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
if (depth)
{
gtk_tree_model_get_iter (GTK_TREE_MODEL (tree_store), &parent_iter, path);
gtk_tree_path_free (path);
parent = G_NODE (parent_iter.user_data);
}
@ -2323,7 +2322,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
b = G_NODE (dst_b.user_data);
}
/* if a is NULL, a is NULL too -- we are at the end of the list
/* if a is NULL, b is NULL too -- we are at the end of the list
* yes and we leak memory here ...
*/
if (position)
@ -2466,17 +2465,18 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
if (depth)
{
path = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), &parent_iter);
tmppath = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), &parent_iter);
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store),
path, &parent_iter, order);
tmppath, &parent_iter, order);
}
else
{
path = gtk_tree_path_new ();
tmppath = gtk_tree_path_new ();
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store),
path, NULL, order);
tmppath, NULL, order);
}
gtk_tree_path_free (tmppath);
gtk_tree_path_free (path);
if (position)
gtk_tree_path_free (pos_path);