sched/pthread: fix memory leak of pthread_tcb_s

pthread tcb should be released appropriately

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an
2024-03-06 17:00:22 +08:00
committed by Xiang Xiao
parent 09960c5c7d
commit 89bd6ab74a
+2
View File
@@ -216,6 +216,8 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
return ENOMEM;
}
ptcb->cmn.flags |= TCB_FLAG_FREE_TCB;
/* Bind the parent's group to the new TCB (we have not yet joined the
* group).
*/