mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 13:19:01 +00:00
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:
parent
09960c5c7d
commit
89bd6ab74a
1 changed files with 2 additions and 0 deletions
|
|
@ -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).
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue