Bug #726225 - [abrt] Memory corruption during message list regen after Trash expunge

This commit is contained in:
Milan Crha
2014-03-13 17:44:36 +01:00
parent 3e8d9c0842
commit ec79e62d98

View File

@ -5403,9 +5403,13 @@ message_list_regen_thread (GSimpleAsyncResult *simple,
thread_tree = message_list_ref_thread_tree (message_list);
if (thread_tree != NULL)
if (thread_tree != NULL) {
/* Make sure multiple threads will not access the same
CamelFolderThread structure at the same time */
g_mutex_lock (&message_list->priv->thread_tree_lock);
camel_folder_thread_messages_apply (thread_tree, uids);
else
g_mutex_unlock (&message_list->priv->thread_tree_lock);
} else
thread_tree = camel_folder_thread_messages_new (
folder, uids, regen_data->thread_subject);