aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mark-all-read/ChangeLog7
-rw-r--r--plugins/mark-all-read/mark-all-read.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/plugins/mark-all-read/ChangeLog b/plugins/mark-all-read/ChangeLog
index f0cb153b75..c3d927f105 100644
--- a/plugins/mark-all-read/ChangeLog
+++ b/plugins/mark-all-read/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-02 Paul Bolle <pebolle@tiscali.nl>
+
+ ** Fixes bug #550415
+
+ * mark-all-read.c (mar_got_folder): Do not leak an CamelFolderInfo.
+ Slightly change handling of CamelException.
+
2008-08-27 Sankar P <psankar@novell.com>
License Changes
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