That was not such a good destruction order in the error case. As the scheduler
accesses the scheduler data inside the thread structure, freeing it first lead to a crash when a thread couldn't be created. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -313,9 +313,10 @@ err2:
|
|||||||
err1:
|
err1:
|
||||||
// ToDo: put them in the dead queue instead?
|
// ToDo: put them in the dead queue instead?
|
||||||
if (inthread == NULL) {
|
if (inthread == NULL) {
|
||||||
free(thread);
|
|
||||||
scheduler_on_thread_destroy(thread);
|
scheduler_on_thread_destroy(thread);
|
||||||
|
free(thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user