thread_func_event_data->multi_user_name = g_strdup(multi_user_name);
THREAD_CREATE(delete_thread, thread_func_to_delete_mail, (void *)thread_func_event_data, thread_error);
- THREAD_DETACH(delete_thread); /* free resources used for new thread */
+ if (thread_error == 0)
+ THREAD_DETACH(delete_thread); /* free resources used for new thread */
ret = true;
FINISH_OFF2:
thread_func_event_data->multi_user_name = g_strdup(multi_user_name);
THREAD_CREATE(move_thread, thread_func_to_move_mail, (void*)thread_func_event_data, thread_error);
- THREAD_DETACH(move_thread); /* free resources used for new thread */
+ if (thread_error == 0)
+ THREAD_DETACH(move_thread); /* free resources used for new thread */
EM_DEBUG_LOG("thread_error [%d]", thread_error);
ret = true;
thread_func_event_data->multi_user_name = g_strdup(multi_user_name);
THREAD_CREATE(move_thread, thread_func_to_move_mail, (void*)thread_func_event_data, thread_error);
- THREAD_DETACH(move_thread); /* free resources used for new thread */
+ if (thread_error == 0)
+ THREAD_DETACH(move_thread); /* free resources used for new thread */
EM_DEBUG_LOG("thread_error [%d]", thread_error);
ret = true;