aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-12 10:15:27 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-12 10:15:27 +0000
commitc505586c9e396225a26f2325fdde54162ecf54bb (patch)
tree30bda8ed560d022e123b9e8716a79828945808a2
parent7453f17c71180722d11c29ee987d5ca5f2536e2b (diff)
fixed a memory leak where threading is off.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@894 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/summaryview.c7
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5191707e..5acf25fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-01-12
+ * src/summaryview.c: summary_set_tree_model_from_list(): fixed a
+ memory leak where threading is off.
+
+2006-01-12
+
* libsylph/virtual.c: virtual_rename_folder(): added.
* src/folderview.c: folderview_rename_folder_cb(): fixed renaming of
virtual folders.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 2e99e50d..ba16074d 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2006-01-12
+ * src/summaryview.c: summary_set_tree_model_from_list(): スレッド表示
+ が off の場合のメモリリークを修正。
+
+2006-01-12
+
* libsylph/virtual.c: virtual_rename_folder(): 追加。
* src/folderview.c: folderview_rename_folder_cb(): 仮想フォルダの
名前変更を修正。
diff --git a/src/summaryview.c b/src/summaryview.c
index a0f4f5e7..f6542ec4 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -2099,10 +2099,11 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
summaryview->total_size += msginfo->size;
}
} else {
+ GSList *rev_mlist;
GtkTreeIter iter;
- mlist = g_slist_reverse(mlist);
- for (cur = mlist; cur != NULL; cur = cur->next) {
+ rev_mlist = g_slist_reverse(g_slist_copy(mlist));
+ for (cur = rev_mlist; cur != NULL; cur = cur->next) {
msginfo = (MsgInfo *)cur->data;
gtk_tree_store_prepend(store, &iter, NULL);
@@ -2112,7 +2113,7 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
summaryview->deleted++;
summaryview->total_size += msginfo->size;
}
- /* mlist = g_slist_reverse(mlist); */
+ g_slist_free(rev_mlist);
}
gtk_tree_view_set_model(GTK_TREE_VIEW(summaryview->treeview),