diff --git a/src/thread.c b/src/thread.c index 32471bad3fda5c2268da79f5e83ff8179c4178f7..544a295eaa82672512ca314dbc31864fe7342d82 100644 --- a/src/thread.c +++ b/src/thread.c @@ -74,7 +74,8 @@ static rt_err_t _rt_thread_init(struct rt_thread* thread, thread->error = RT_EOK; thread->stat = RT_THREAD_INIT; - /* init user data */ + /* initialize cleanup function and user data */ + thread->cleanup = 0; thread->user_data = 0; /* init thread timer */