summaryrefslogtreecommitdiff
path: root/nuttx/sched/pthread_detach.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/pthread_detach.c')
-rw-r--r--nuttx/sched/pthread_detach.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/nuttx/sched/pthread_detach.c b/nuttx/sched/pthread_detach.c
index ca3f732f4..a1a60acf5 100644
--- a/nuttx/sched/pthread_detach.c
+++ b/nuttx/sched/pthread_detach.c
@@ -109,9 +109,7 @@ int pthread_detach(pthread_t thread)
{
/* YES.. just remove the thread entry. */
- (void)pthread_removejoininfo((pid_t)thread);
- sched_free(pjoin);
- pjoin = NULL;
+ pthread_destroyjoin(pjoin);
}
else
{