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:
kib 2015-03-05 09:00:27 +00:00
parent 5b322e75c9
commit e4e2464970

View File

@ -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);
}