From 4672b6f5316486bd7ab57d2973efb3b97b96ba56 Mon Sep 17 00:00:00 2001 From: Grahame Bowland Date: Fri, 31 Oct 2008 02:23:30 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20558185=20=E2=80=93=20'parent'=20variable?= =?UTF-8?q?=20in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-10-31 Grahame Bowland Bug 558185 – 'parent' variable in g_local_file_get_child_for_display_name() hits g_object_unref(NULL) assertion * gio/glocalfile.c: - remove unused variable. Patch by Matt Johnston svn path=/branches/glib-2-18/; revision=7635 --- ChangeLog | 8 ++++++++ gio/glocalfile.c | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83c55886c..81696539f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-31 Grahame Bowland + + Bug 558185 – 'parent' variable in g_local_file_get_child_for_display_name() + hits g_object_unref(NULL) assertion + + * gio/glocalfile.c: + - remove unused variable. Patch by Matt Johnston + 2008-10-20 Christian Persch Bug 557087 – mem leak in g_content_types_get_registered diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 7f1682336..9577e726b 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -592,7 +592,7 @@ g_local_file_get_child_for_display_name (GFile *file, const char *display_name, GError **error) { - GFile *parent, *new_file; + GFile *new_file; char *basename; basename = g_filename_from_utf8 (display_name, -1, NULL, NULL, NULL); @@ -604,9 +604,7 @@ g_local_file_get_child_for_display_name (GFile *file, return NULL; } - parent = g_file_get_parent (file); new_file = g_file_get_child (file, basename); - g_object_unref (parent); g_free (basename); return new_file;