diff options
author | phantom <phantom@FreeBSD.org> | 2002-10-26 13:47:06 +0000 |
---|---|---|
committer | phantom <phantom@FreeBSD.org> | 2002-10-26 13:47:06 +0000 |
commit | aa436ba4b07391afb9b3280dc84e179c46f997f2 (patch) | |
tree | 248735787ff3ae632fea9f12cc50e560822cb74b /lib/libc_r/uthread | |
parent | f1a2b7fcfee1a341d621ae6113f38155c2932ca6 (diff) | |
download | FreeBSD-src-aa436ba4b07391afb9b3280dc84e179c46f997f2.zip FreeBSD-src-aa436ba4b07391afb9b3280dc84e179c46f997f2.tar.gz |
Be more agresive on arguments' checking.
OK'ed by: deischen
MFC after: 3 days
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r-- | lib/libc_r/uthread/uthread_create.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c index 0f006a9..6769428 100644 --- a/lib/libc_r/uthread/uthread_create.c +++ b/lib/libc_r/uthread/uthread_create.c @@ -59,7 +59,7 @@ int _thread_PS_DEAD_value = PS_DEAD; __weak_reference(_pthread_create, pthread_create); int -_pthread_create(pthread_t * thread, const pthread_attr_t * attr, +_pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg) { struct pthread *curthread = _get_curthread(); @@ -71,6 +71,9 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, pthread_attr_t pattr; void *stack; + if (thread == NULL) + return(EINVAL); + /* * Locking functions in libc are required when there are * threads other than the initial thread. |