summaryrefslogtreecommitdiff
path: root/pthread_mutex_lock.c
diff options
context:
space:
mode:
authorrpj <rpj>2005-05-08 16:52:50 +0000
committerrpj <rpj>2005-05-08 16:52:50 +0000
commit7395b1431d5e2160682de273b46252c747ccbf36 (patch)
treebcff10e33282212ae087bb5074bc6025fc1313a3 /pthread_mutex_lock.c
parent78f83cfa240ec14874b22c7302ff8d306c130aaf (diff)
''
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