From ab8c16160186f5daa083cff5421b539243f2cf9b Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 2 Oct 2008 19:47:45 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20554696=20=E2=80=93=20invalid=20free=20fun?= =?UTF-8?q?ction=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=21569 --- ChangeLog | 6 ++++++ gtk/gtkfilesystemmodel.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c5e891e01..3a75c83078 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-02 Christian Persch + + Bug 554696 – invalid free function used + + * gtk/gtkfilesystemmodel.c: Use the right free func. + 2008-10-02 Christian Persch Bug 554691 – mem leak in filechooser diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index aab21109db..de08a6374f 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -1022,7 +1022,7 @@ ref_path_cb (GCancellable *cancellable, goto out; } - g_object_unref (info->files); + g_object_unref (info->files->data); info->files = g_slist_remove (info->files, info->files->data); if (g_slist_length (info->files) < 1) @@ -1070,7 +1070,8 @@ ref_path_cb (GCancellable *cancellable, out: if (info->node) unref_node_and_parents (info->model, info->node); - g_object_unref (info->files); + g_slist_foreach (info->files, (GFunc)g_object_unref, NULL); + g_slist_free (info->files); g_slist_foreach (info->cleanups, (GFunc)g_object_unref, NULL); g_slist_free (info->cleanups); g_object_unref (info->model);