From b322b86a999d3bf82860066fbf6fda00619136fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 16 Dec 2017 20:49:30 +0300 Subject: some additional checks --- libs/pthreads/src/pthread_mutex_trylock.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/pthreads/src/pthread_mutex_trylock.c') diff --git a/libs/pthreads/src/pthread_mutex_trylock.c b/libs/pthreads/src/pthread_mutex_trylock.c index d6b68724db..5728728b62 100644 --- a/libs/pthreads/src/pthread_mutex_trylock.c +++ b/libs/pthreads/src/pthread_mutex_trylock.c @@ -64,6 +64,10 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) } mx = *mutex; + if (mx == NULL) { + return EINVAL; + } + kind = mx->kind; if (kind >= 0) -- cgit v1.2.3