aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mark-all-read/mark-all-read.c
diff options
context:
space:
mode:
authorSuman Manjunath <msuman@src.gnome.org>2008-09-08 11:31:26 +0800
committerSuman Manjunath <msuman@src.gnome.org>2008-09-08 11:31:26 +0800
commit4e08f09a43af4d11e206f72728556b22382ced71 (patch)
treedcd34e0292411165a18c22c10087998e173c1c56 /plugins/mark-all-read/mark-all-read.c
parent623b6f47b058ce6ba374162c397d138a6f831a3d (diff)
downloadgsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar.gz
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar.bz2
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar.lz
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar.xz
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.tar.zst
gsoc2013-evolution-4e08f09a43af4d11e206f72728556b22382ced71.zip
Patch from Paul Bolle <pebolle@tiscali.nl> ** Fixes bug #550415 (Fixes a memory leak of CamelFolderInfo).
svn path=/trunk/; revision=36274
Diffstat (limited to 'plugins/mark-all-read/mark-all-read.c')
-rw-r--r--plugins/mark-all-read/mark-all-read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 3a1f9ef13a..c9ea67ca61 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -223,19 +223,17 @@ mar_got_folder (char *uri, CamelFolder *folder, void *data)
gint response;
guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_FAST;
- camel_exception_init (&ex);
-
/* FIXME we have to disable the menu item */
if (!folder)
return;
+ camel_exception_init (&ex);
+
store = folder->parent_store;
info = camel_store_get_folder_info (store, folder->full_name, flags, &ex);
- if (camel_exception_is_set (&ex)) {
- camel_exception_clear (&ex);
- return;
- }
+ if (camel_exception_is_set (&ex))
+ goto out;
if (info && (info->child || info->next))
response = prompt_user ();
@@ -246,6 +244,8 @@ mar_got_folder (char *uri, CamelFolder *folder, void *data)
mark_all_as_read (folder);
else if (response == GTK_RESPONSE_YES)
mar_all_sub_folders (store, info, &ex);
+out:
+ camel_store_free_folder_info(store, info);
}
static void