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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user