[evolution] Bug #642447 - Invalid reads while disabling groupwise account



commit 7cd21fa82a975cc5bbd640869bf77a62c7b30f0a
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 1 12:08:39 2011 +0100

    Bug #642447 - Invalid reads while disabling groupwise account

 plugins/groupwise-features/camel-gw-listener.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
index 02af85b..28efe5c 100644
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ b/plugins/groupwise-features/camel-gw-listener.c
@@ -324,6 +324,9 @@ remove_esource (const gchar *conf_key, const gchar *group_name, gchar * source_n
 				}
 			}
 
+			if (found_group)
+				break;
+
 		}
 
 	}
@@ -400,6 +403,9 @@ modify_esource (const gchar * conf_key, GwAccountInfo *old_account_info, EAccoun
 					break;
 				}
 			}
+
+			if (found_group)
+				break;
 		}
 	}
 
@@ -749,7 +755,6 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info)
 	ESourceList *list;
 	ESourceGroup *group;
 	GSList *groups;
-	gboolean found_group;
 	CamelURL *url;
 	gchar *base_uri;
 	GConfClient *client;
@@ -769,17 +774,14 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info)
 	list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
 	groups = e_source_list_peek_groups (list);
 
-	found_group = FALSE;
-
-	for (; groups != NULL &&  !found_group; groups = g_slist_next (groups)) {
+	for (; groups != NULL; groups = g_slist_next (groups)) {
 
 		group = E_SOURCE_GROUP (groups->data);
 		if ( strcmp ( e_source_group_peek_base_uri (group), base_uri) == 0 && strcmp (e_source_group_peek_name (group), existing_account_info->name) == 0) {
 
 			e_source_list_remove_group (list, group);
 			e_source_list_sync (list, NULL);
-			found_group = TRUE;
-
+			break;
 		}
 	}
 	g_object_unref (list);
@@ -967,6 +969,7 @@ prune_proxies (void) {
 					if (parent_id_name) {
 						e_source_group_remove_source (group, source);
 						e_source_list_remove_group (sources, group);
+						break;
 					}
 				}
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]