mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Be more agresive on arguments' checking.
OK'ed by: deischen MFC after: 3 days
This commit is contained in:
parent
0607fb02d9
commit
64536616e6
1 changed files with 4 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue