浏览代码

[dlmodule] Fix crash when dlmodule exit

Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Cliff Chen 5 年之前
父节点
当前提交
42f9de1b42
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/libc/libdl/dlmodule.c

+ 1 - 1
components/libc/libdl/dlmodule.c

@@ -124,7 +124,7 @@ static void _dlmodule_exit(void)
                 rt_thread_t thread = (rt_thread_t)object;
                 rt_thread_t thread = (rt_thread_t)object;
 
 
                 /* stop timer and suspend thread*/
                 /* stop timer and suspend thread*/
-                if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE ||
+                if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE &&
                     (thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
                     (thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
                 {
                 {
                     rt_timer_stop(&(thread->thread_timer));
                     rt_timer_stop(&(thread->thread_timer));