diff options
Diffstat (limited to 'lib/libpthread/thread/thr_detach.c')
-rw-r--r-- | lib/libpthread/thread/thr_detach.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_detach.c b/lib/libpthread/thread/thr_detach.c index a9f2469..57c073a 100644 --- a/lib/libpthread/thread/thr_detach.c +++ b/lib/libpthread/thread/thr_detach.c @@ -46,7 +46,7 @@ pthread_detach(pthread_t pthread) _thread_kern_sig_block(&status); /* Check for invalid calling parameters: */ - if (pthread == NULL) { + if (pthread == NULL || pthread->magic != PTHREAD_MAGIC) { /* Return an invalid argument error: */ rval = EINVAL; } |