summaryrefslogtreecommitdiff
path: root/pthread_mutex_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_mutex_lock.c')
-rw-r--r--pthread_mutex_lock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c
index 301f7bf..4ca5c25 100644
--- a/pthread_mutex_lock.c
+++ b/pthread_mutex_lock.c
@@ -49,6 +49,10 @@ pthread_mutex_lock (pthread_mutex_t * mutex)
/*
* Let the system deal with invalid pointers.
*/
+ if (*mutex == NULL)
+ {
+ return EINVAL;
+ }
/*
* We do a quick check to see if we need to do more work