[GW-Mailer] Fix for a crash on disabling an account

"P Sankar" <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi,

Attached is the patch to fix a crash on disabling a groupwise account.
Please review.

Sankar

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
info-free.patch (text/plain, 1.6 KB)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.156
diff -u -p -r1.156 ChangeLog
--- ChangeLog	18 Apr 2006 15:15:30 -0000	1.156
+++ ChangeLog	20 Apr 2006 06:57:05 -0000
@@ -1,3 +1,9 @@
+2006-04-20  Sankar P  <[email protected]>
+
+	* camel-groupwise-summary.c : (groupwise_summary_clear):
+	Removes from summary based on uid instead of info.
+	This will avoid double-free crash of info.
+	
 2006-04-18  Sankar P  <[email protected]>
 
 	* camel-groupwise-folder.c: (groupwise_sync):
Index: camel-groupwise-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-summary.c,v
retrieving revision 1.10
diff -u -p -r1.10 camel-groupwise-summary.c
--- camel-groupwise-summary.c	9 Nov 2005 14:23:44 -0000	1.10
+++ camel-groupwise-summary.c	20 Apr 2006 06:57:06 -0000
@@ -330,15 +330,17 @@ groupwise_summary_clear (CamelFolderSumm
 	CamelFolderChangeInfo *changes;
 	CamelMessageInfo *info;
 	int i, count;
+	const char *uid;
 
 	changes = camel_folder_change_info_new ();
 	count = camel_folder_summary_count (summary);
 	for (i = 0; i < count; i++) {
 		if (!(info = camel_folder_summary_index (summary, i)))
 			continue;
-
-		camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info));
-		camel_folder_summary_remove(summary, info);
+  		
+		uid = camel_message_info_uid (info);
+		camel_folder_change_info_remove_uid (changes, uid);
+		camel_folder_summary_remove_uid (summary, uid);
 		camel_message_info_free(info);
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.