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:
Michael Lotz
2009-11-07 16:33:29 +00:00
parent c42474cb03
commit 8665c30ace
+2 -1
View File
@@ -313,9 +313,10 @@ err2:
err1:
// ToDo: put them in the dead queue instead?
if (inthread == NULL) {
free(thread);
scheduler_on_thread_destroy(thread);
free(thread);
}
return NULL;
}