Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 35805)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-07-21  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #543532
+
+	* em-folder-tree-model.c: (em_folder_tree_model_remove_store_info):
+	Let free memory when we are done with it, not before.
+
 2008-07-21  Tor Lillqvist  <tml@novell.com>
 
 	* em-migrate.c: Rearrange G_OS_WIN32 ifdefs a bit, as we need
Index: mail/em-folder-tree-model.c
===================================================================
--- mail/em-folder-tree-model.c	(revision 35805)
+++ mail/em-folder-tree-model.c	(working copy)
@@ -878,8 +878,9 @@ em_folder_tree_model_remove_store_info (
 	if (!(si = g_hash_table_lookup (model->store_hash, store)))
 		return;
 
-	g_hash_table_remove (model->store_hash, si->store);
 	g_hash_table_remove (model->account_hash, si->account);
+	/* store_hash owns and frees the si structure, thus free it after done with it */
+	g_hash_table_remove (model->store_hash, si->store);
 }
 
 
