aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_timedjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_timedjoin.c')
-rw-r--r--nptl/pthread_timedjoin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/pthread_timedjoin.c b/nptl/pthread_timedjoin.c
index dd51fea4aa..0883f94f60 100644
--- a/nptl/pthread_timedjoin.c
+++ b/nptl/pthread_timedjoin.c
@@ -42,7 +42,7 @@ pthread_timedjoin_np (threadid, thread_return, abstime)
int result;
/* Make sure the descriptor is valid. */
- if (DEBUGGING_P && __find_in_stack_list (pd) == NULL)
+ if ((DEBUGGING_P && __find_in_stack_list (pd) == NULL) || pd->tid <= 0)
/* Not a valid thread handle. */
return ESRCH;