aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-20 13:58:35 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-20 13:58:35 +0800
commitb125d06dc268441611b49c5e32dee81cd840f9a2 (patch)
tree4c928d9fcf8100eddc70edc9a395522a5ed616ad /mail
parent79aed0f7f042554d54c1504f7401624163499c36 (diff)
downloadgsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar.gz
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar.bz2
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar.lz
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar.xz
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.tar.zst
gsoc2013-evolution-b125d06dc268441611b49c5e32dee81cd840f9a2.zip
Remove the node before freeing the data it points to.
2001-03-20 Christopher James Lahey <clahey@ximian.com> * message-list.c (remove_node_diff, build_flat_diff): Remove the node before freeing the data it points to. svn path=/trunk/; revision=8841
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index aa7e6623be..1c218d0a03 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-20 Christopher James Lahey <clahey@ximian.com>
+
+ * message-list.c (remove_node_diff, build_flat_diff): Remove the
+ node before freeing the data it points to.
+
2001-03-19 Christopher James Lahey <clahey@ximian.com>
* Merged e-tree-rework-branch:
diff --git a/mail/message-list.c b/mail/message-list.c
index 52c9e4da45..1a6248fa2c 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1565,14 +1565,14 @@ remove_node_diff(MessageList *ml, ETreePath node, int depth)
/* and the rowid entry - if and only if it is referencing this node */
info = e_tree_memory_node_get_data(E_TREE_MEMORY (etm), node);
- g_assert(info);
- g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(info));
- camel_folder_free_message_info(ml->folder, info);
- e_tree_memory_node_set_data(E_TREE_MEMORY(etm), node, NULL);
/* and only at the toplevel, remove the node (etree should optimise this remove somewhat) */
if (depth == 0)
e_tree_memory_node_remove(E_TREE_MEMORY(etm), node);
+
+ g_assert(info);
+ g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(info));
+ camel_folder_free_message_info(ml->folder, info);
}
/* applies a new tree structure to an existing tree, but only by changing things
@@ -1776,9 +1776,9 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
node = g_hash_table_lookup(ml->uid_nodemap, changes->uid_removed->pdata[i]);
if (node) {
info = e_tree_memory_node_get_data(E_TREE_MEMORY(ml->model), node);
+ e_tree_memory_node_remove(E_TREE_MEMORY(ml->model), node);
camel_folder_free_message_info(ml->folder, info);
g_hash_table_remove(ml->uid_nodemap, changes->uid_removed->pdata[i]);
- e_tree_memory_node_remove(E_TREE_MEMORY(ml->model), node);
}
}