fix for a crash in connector [exchange]

pchenthill <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi,
   Have attached the fix for a crash in connector. unref the folder at
the end of the function as the folder is used in the subtree list.
Attaching the traces for the crash.

thanks, Chenthill.

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
patch.diff (text/x-patch, 1.6 KB)
? 326413.diff
? patch.diff
? storage/a
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/ChangeLog,v
retrieving revision 1.59
diff -u -p -r1.59 ChangeLog
--- ChangeLog	13 Feb 2006 12:21:38 -0000	1.59
+++ ChangeLog	22 Feb 2006 07:36:58 -0000
@@ -1,3 +1,9 @@
+2006-02-22  Chenthill Palanisamy  <[email protected]>
+
+	Fixes a crash
+	* storage/exchange-hierarchy-webdav.c: (scan_subtree):
+	unref the folder at the end.
+
 2006-02-13  Chenthill Palanisamy  <[email protected]>
 
 	* storage/exchange-hierarchy-webdav.c: (init),
Index: storage/exchange-hierarchy-webdav.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/exchange-hierarchy-webdav.c,v
retrieving revision 1.10
diff -u -p -r1.10 exchange-hierarchy-webdav.c
--- storage/exchange-hierarchy-webdav.c	13 Feb 2006 12:21:39 -0000	1.10
+++ storage/exchange-hierarchy-webdav.c	22 Feb 2006 07:36:58 -0000
@@ -729,7 +729,6 @@ scan_subtree (ExchangeHierarchy *hier, E
 			subtrees = g_slist_prepend (subtrees, folder);
 		}
 		exchange_hierarchy_new_folder (hier, folder);
-		g_object_unref (folder);
 
 		/* Check the folder size here */
 		name = e2k_properties_get_prop (result->props,
@@ -759,7 +758,8 @@ scan_subtree (ExchangeHierarchy *hier, E
 			continue;
 		scan_subtree (hier, folder, mode);
 	}
-
+		
+	g_object_unref (folder);
 	return exchange_hierarchy_webdav_status_to_folder_result (status);
 }
connector_crash3.txt (text/plain, 1.3 KB)
0xb664d549 in g_type_check_instance_is_a () from /opt/gnome/lib/libgobject-2.0.so.0
(gdb) ba
#0  0xb664d549 in g_type_check_instance_is_a () from /opt/gnome/lib/libgobject-2.0.so.0
#1  0xb75b8bac in e_folder_exchange_get_internal_uri (folder=0x830b928) at e-folder-exchange.c:214
#2  0xb75c8bd6 in scan_subtree (hier=0x812db88, parent=0x812deb0, mode=2) at exchange-hierarchy-webdav.c:757
#3  0xb75c9e75 in exchange_hierarchy_scan_subtree (hier=0x812db88, folder=0x812deb0, mode=2) at exchange-hierarchy.c:319
#4  0xb75bf42a in exchange_account_rescan_tree (account=0x80e6cc8) at exchange-account.c:340
#5  0x08061d48 in get_folder_info (stub=0x80f4200, top=0x817d340 "", store_flags=6) at mail-stub-exchange.c:2293
#6  0x08064995 in connection_handler (source=0x80f4278, condition=G_IO_IN, data=0x80f4200) at mail-stub.c:327
#7  0xb65b193d in g_io_channel_unix_get_fd () from /opt/gnome/lib/libglib-2.0.so.0
#8  0xb6588abd in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#9  0xb658bcbf in g_main_context_check () from /opt/gnome/lib/libglib-2.0.so.0
#10 0xb658c069 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#11 0xb6866b83 in bonobo_main () from /opt/gnome/lib/libbonobo-2.so.0
#12 0x0805bc9e in main (argc=1, argv=0xbfa64d04) at main.c:238
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.