summaryrefslogtreecommitdiff
path: root/components/lwp/lwp_pid.c
diff options
context:
space:
mode:
authorgeniusgogo <[email protected]>2023-08-08 00:22:14 +0800
committerGitHub <[email protected]>2023-08-07 12:22:14 -0400
commit4d20416b2f62cbb6c98e88223d6a0d1638b7f1c0 (patch)
tree6cb74da348244a1b1584d08faf9e02294d92d139 /components/lwp/lwp_pid.c
parent7e7b303dd475f71c3301fb494f7622fe0295435e (diff)
update components & lwp. (#7888)
Diffstat (limited to 'components/lwp/lwp_pid.c')
-rw-r--r--components/lwp/lwp_pid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/lwp/lwp_pid.c b/components/lwp/lwp_pid.c
index 82185adf34..79f4e2ec0f 100644
--- a/components/lwp/lwp_pid.c
+++ b/components/lwp/lwp_pid.c
@@ -106,6 +106,11 @@ static void lwp_pid_put(pid_t pid)
rt_base_t level;
struct lwp_avl_struct *p;
+ if (pid == 0)
+ {
+ return;
+ }
+
level = rt_hw_interrupt_disable();
p = lwp_avl_find(pid, lwp_pid_root);
if (p)