Fix a null dereference leading to a core dump when
the number of threads exceeds the number of open slots in ldt_entries[]. Approved by: markm (mentor)(implicit) Reviewed by: jeff
This commit is contained in:
parent
ae0df91f34
commit
a260623c5f
@ -62,7 +62,10 @@ ldt_init(void)
|
||||
void
|
||||
_retire_thread(void *entry)
|
||||
{
|
||||
*(void **)entry = *ldt_free;
|
||||
if (ldt_free == NULL)
|
||||
*(void **)entry = NULL;
|
||||
else
|
||||
*(void **)entry = *ldt_free;
|
||||
ldt_free = entry;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user