diff options
author | Dan Winship <danw@src.gnome.org> | 2003-06-20 22:37:29 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-06-20 22:37:29 +0800 |
commit | c20675d2016a9f52da128d09ca03a46bc679e946 (patch) | |
tree | 6c394a7c0dc39a46b4c1adcde337370ccf14560a /shell | |
parent | a6056c7493a946bb291610d3caed793786afdb9c (diff) | |
download | gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar.gz gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar.bz2 gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar.lz gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar.xz gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.tar.zst gsoc2013-evolution-c20675d2016a9f52da128d09ca03a46bc679e946.zip |
Don't leak parent_path, even on error
* e-folder-tree.c (e_folder_tree_add): Don't leak parent_path,
even on error
svn path=/trunk/; revision=21498
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 5 | ||||
-rw-r--r-- | shell/e-folder-tree.c | 4 |
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; } |