aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/e-folder-tree.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index f115f33a23..347dabb27e 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-19 Dan Winship <danw@ximian.com>
+
+ * e-folder-tree.c (e_folder_tree_add): Don't leak parent_path,
+ even on error
+
2003-06-16 Frederic Crozat <fcrozat@mandrakesoft.com>
* Makefile.am:
diff --git a/shell/e-folder-tree.c b/shell/e-folder-tree.c
index f6decb4fc0..c10f1aa241 100644
--- a/shell/e-folder-tree.c
+++ b/shell/e-folder-tree.c
@@ -262,8 +262,10 @@ e_folder_tree_add (EFolderTree *folder_tree,
if (parent_folder == NULL) {
g_warning ("e_folder_tree_add() -- Trying to add a subfolder to a path that does not exist yet -- %s",
parent_path);
+ g_free (parent_path);
return FALSE;
}
+ g_free (parent_path);
folder = g_hash_table_lookup (folder_tree->path_to_folder, path);
if (folder != NULL) {
@@ -285,8 +287,6 @@ e_folder_tree_add (EFolderTree *folder_tree,
g_hash_table_insert (folder_tree->path_to_folder, folder->path, folder);
g_hash_table_insert (folder_tree->data_to_path, data, folder->path);
- g_free (parent_path);
-
return TRUE;
}