evolution-data-server r8580 - in branches/gnome-2-22/servers/exchange: . storage



Author: mbarnes
Date: Mon Mar 24 14:57:34 2008
New Revision: 8580
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8580&view=rev

Log:
2008-03-24  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #523023

	* servers/exchange/storage/exchange-hierarchy-webdav.c
        (scan_subtree): Fix a severe EFolder reference count leak.



Modified:
   branches/gnome-2-22/servers/exchange/ChangeLog
   branches/gnome-2-22/servers/exchange/storage/exchange-hierarchy-webdav.c

Modified: branches/gnome-2-22/servers/exchange/storage/exchange-hierarchy-webdav.c
==============================================================================
--- branches/gnome-2-22/servers/exchange/storage/exchange-hierarchy-webdav.c	(original)
+++ branches/gnome-2-22/servers/exchange/storage/exchange-hierarchy-webdav.c	Mon Mar 24 14:57:34 2008
@@ -756,10 +756,10 @@
 		if (hwd->priv->deep_searchable &&
 		    e_folder_exchange_get_has_subfolders (folder)) {
 			e_folder_exchange_set_has_subfolders (folder, FALSE);
-			subtrees = g_slist_prepend (subtrees, folder);
+			subtrees = g_slist_prepend (subtrees, g_object_ref (folder));
 		}
 		exchange_hierarchy_new_folder (hier, folder);
-		//g_object_unref (folder);
+		g_object_unref (folder);
 
 		/* Check the folder size here */
 		if (hier->type != EXCHANGE_HIERARCHY_PUBLIC) {
@@ -788,11 +788,16 @@
 	while (subtrees) {
 		folder = subtrees->data;
 		subtrees = g_slist_remove (subtrees, folder);
+
 		/* Dont scan the subtree for deleteditems folder */
 		int_uri = e_folder_exchange_get_internal_uri (folder);
-		if (int_uri && deleted_items_uri && !strcmp (int_uri, deleted_items_uri))
+		if (int_uri && deleted_items_uri && !strcmp (int_uri, deleted_items_uri)) {
+			g_object_unref (folder);
 			continue;
+		}
+
 		scan_subtree (hier, folder, mode);
+		g_object_unref (folder);
 	}
 
 	e_folder_exchange_set_rescan_tree (parent, FALSE);



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