aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 84f7066075..5443c1478e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-11 Srinivasa Ragavan <sragavan@novell.com>
+
+ * mail/message-list.c: Don't use uninitialized exception. It leads to
+ freeing uninitialized memory.
+
2008-08-07 Paul Bolle <pebolle@tiscali.nl>
** Fix for bug #546788
diff --git a/mail/message-list.c b/mail/message-list.c
index e12d304505..d6d5ec7f50 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4076,9 +4076,15 @@ regen_list_exec (struct _regen_list_msg *m)
m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject);
} else {
m->summary = g_ptr_array_new ();
- if (showuids->len != camel_folder_summary_cache_size (m->folder->summary) ) {
- CamelException ex;
+ if (showuids->len > camel_folder_summary_cache_size (m->folder->summary) ) {
+ CamelException ex;
+ camel_exception_init (&ex);
camel_folder_summary_reload_from_db (m->folder->summary, &ex);
+ if (camel_exception_is_set (&ex)) {
+ g_warning ("Exception while reloading: %s\n", camel_exception_get_description (&ex));
+ camel_exception_clear (&ex);
+ }
+
}
for (i = 0; i < showuids->len; i++) {
info = camel_folder_get_message_info (m->folder, showuids->pdata[i]);