Segmentation fault when getting folders



Hi,

I think I found a bug when getting folders. In line 644 of
tny-camel-store-account.c store is initialized as its parent "service"
private field. Then it's assigned in line 687 to priv->iter_store. Then
when the finalize method is called, priv->iter_store is unreffed, and
so, its parent "service" field. So when the finalize calls its parent's
finalize, the TnyCamelAccount will try to free it and so it will crash.

Br.
Index: tny-camel-store-account.c
===================================================================
--- tny-camel-store-account.c	(revision 1752)
+++ tny-camel-store-account.c	(working copy)
@@ -684,6 +684,7 @@
 	}
 
 	priv->iter = iter;
+	camel_object_ref (CAMEL_OBJECT (store));
 	priv->iter_store = store;
 
 	if (iter)


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