MFC r279318:
Check that the pointer to the thread return value is not NULL before dereferencing. NULL is allowed by C11 and must be handled.
This commit is contained in:
parent
5b322e75c9
commit
e4e2464970
@ -108,6 +108,7 @@ thrd_join(thrd_t thr, int *res)
|
||||
|
||||
if (pthread_join(thr, &value_ptr) != 0)
|
||||
return (thrd_error);
|
||||
if (res != NULL)
|
||||
*res = (intptr_t)value_ptr;
|
||||
return (thrd_success);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user