From 4c45b083e13fc9d960bb6f2c7168698c638c38e3 Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Mon, 13 Feb 2017 14:24:32 -0800 Subject: [PATCH] Do not leak file info for . and .. dirs https://github.com/GNOME/gedit/commit/fa5fa82ce0e093383437621a53df2605999da1d1 --- plugins/filebrowser/xed-file-browser-store.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/filebrowser/xed-file-browser-store.c b/plugins/filebrowser/xed-file-browser-store.c index eae3e1e..1032ec0 100644 --- a/plugins/filebrowser/xed-file-browser-store.c +++ b/plugins/filebrowser/xed-file-browser-store.c @@ -2276,15 +2276,17 @@ model_add_nodes_from_files (XedFileBrowserStore *model, (strcmp (name, ".") == 0 || strcmp (name, "..") == 0)) { + g_object_unref (info); continue; } file = g_file_get_child (parent->file, name); - if ((node = node_list_contains_file (original_children, file)) == NULL) + node = node_list_contains_file (original_children, file); + if (node == NULL) { - if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) + if (type == G_FILE_TYPE_DIRECTORY) { node = file_browser_node_dir_new (model, file, parent); }