BLI_task: fix bad freeing of current task_thread in case POSIX thread creation fails.
Trying to MEM_free a single item of a whole MEM_calloc'ated array, tsst... Luckily looks like POSIX thread creation does not fail often! :P
This commit is contained in:
parent
5551948b31
commit
f56392f224
|
@ -207,7 +207,6 @@ TaskScheduler *BLI_task_scheduler_create(int num_threads)
|
|||
|
||||
if (pthread_create(&scheduler->threads[i], NULL, task_scheduler_thread_run, thread) != 0) {
|
||||
fprintf(stderr, "TaskScheduler failed to launch thread %d/%d\n", i, num_threads);
|
||||
MEM_freeN(thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue