[gedit] Do not leak file info for . and .. dirs
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Do not leak file info for . and .. dirs
- Date: Mon, 14 Mar 2011 22:49:46 +0000 (UTC)
commit fa5fa82ce0e093383437621a53df2605999da1d1
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Mar 14 22:15:59 2011 +0100
Do not leak file info for . and .. dirs
plugins/filebrowser/gedit-file-browser-store.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/gedit-file-browser-store.c
index efd1f19..f26560b 100644
--- a/plugins/filebrowser/gedit-file-browser-store.c
+++ b/plugins/filebrowser/gedit-file-browser-store.c
@@ -2209,14 +2209,15 @@ model_add_nodes_from_files (GeditFileBrowserStore *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);
else
node = file_browser_node_new (file, parent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]