diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 87452cdc3af..8728e8d90a3 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -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). */