summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorCliff Chen <[email protected]>2020-05-15 17:53:55 +0800
committerCliff Chen <[email protected]>2020-05-15 17:53:55 +0800
commit42f9de1b424626eed6b7a9eaf4d23a0e0b499531 (patch)
tree51aae6d08ef8de54e4c546cc048884cb40d3350f /components/libc
parent4ef35a9deef1512aaebed45bb721984a23f06561 (diff)
[dlmodule] Fix crash when dlmodule exit
Signed-off-by: Cliff Chen <[email protected]>
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/libdl/dlmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/libdl/dlmodule.c b/components/libc/libdl/dlmodule.c
index 2829b7df7d..314cf52709 100644
--- a/components/libc/libdl/dlmodule.c
+++ b/components/libc/libdl/dlmodule.c
@@ -124,7 +124,7 @@ static void _dlmodule_exit(void)
rt_thread_t thread = (rt_thread_t)object;
/* 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)
{
rt_timer_stop(&(thread->thread_timer));