- Restore the NULL check for td_cpuset. This can happen if a partially

constructed thread was torn down as is the case when we fail to allocate
   a kernel stack.
This commit is contained in:
Jeff Roberson 2008-03-19 06:20:21 +00:00
parent 374ae2a393
commit 45aea8de6e

View File

@ -303,7 +303,8 @@ thread_alloc(void)
void
thread_free(struct thread *td)
{
cpuset_rel(td->td_cpuset);
if (td->td_cpuset)
cpuset_rel(td->td_cpuset);
td->td_cpuset = NULL;
cpu_thread_free(td);
if (td->td_altkstack != 0)