aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-02-19 04:55:42 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-02-19 04:55:42 +0800
commitfa7d7fa8b4342a7a0ea198b612487d96176d7b58 (patch)
treed6c32825d0e879598f3d691060d63ef244d936eb
parent6f2a8a88d90bcec610b4391d7b5fbf81f5561cfe (diff)
downloadgsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar.gz
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar.bz2
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar.lz
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar.xz
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.tar.zst
gsoc2013-evolution-fa7d7fa8b4342a7a0ea198b612487d96176d7b58.zip
Fixed a memory leak - make sure to free all uids.
2003-02-18 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (mark_all_as_seen): Fixed a memory leak - make sure to free all uids. svn path=/trunk/; revision=19936
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-callbacks.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cf0b510007..8dc01c71d5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2003-02-18 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-callbacks.c (mark_all_as_seen): Fixed a memory leak - make
+ sure to free all uids.
+
* mail-config.c (uri_to_key): Removed.
(lookup_signature): Removed.
(xml_get_int): Removed.
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 35501453fc..79d58dc079 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2060,8 +2060,10 @@ mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path)
uids = camel_folder_get_uids (fb->folder);
camel_folder_freeze (fb->folder);
- for (i = 0; i < uids->len; i++)
+ for (i = 0; i < uids->len; i++) {
camel_folder_set_message_flags (fb->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, ~0);
+ g_free (uids->pdata[i]);
+ }
camel_folder_thaw (fb->folder);
g_ptr_array_free (uids, TRUE);
}