Patch for a small leak when notifying folder observers
- From: Sergio Villar Senin <svillar igalia com>
- To: tinymail-devel-list gnome org
- Subject: Patch for a small leak when notifying folder observers
- Date: Tue, 11 Dec 2007 11:44:35 +0100
Hi,
find attached the fix to a small leak when notifying the folder observers.
Br
Index: tny-camel-folder.c
===================================================================
--- tny-camel-folder.c (revision 3096)
+++ tny-camel-folder.c (working copy)
@@ -176,7 +176,7 @@
TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self);
TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (priv->account);
TnyIterator *iter;
- GList *list;
+ GList *list, *list_iter;
g_static_rec_mutex_lock (priv->obs_lock);
if (!priv->obs) {
@@ -184,14 +184,15 @@
return;
}
list = g_list_copy (priv->obs);
+ list_iter = list;
g_static_rec_mutex_unlock (priv->obs_lock);
- while (list)
+ while (list_iter)
{
- TnyFolderObserver *observer = TNY_FOLDER_OBSERVER (list->data);
+ TnyFolderObserver *observer = TNY_FOLDER_OBSERVER (list_iter->data);
tny_lockable_lock (apriv->session->priv->ui_lock);
tny_folder_observer_update (observer, change);
tny_lockable_unlock (apriv->session->priv->ui_lock);
- list = g_list_next (list);
+ list_iter = g_list_next (list_iter);
}
g_list_free (list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]