From f56392f224e6a7fa6b551d10006bea8bb08ebc6c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 18 Oct 2015 14:39:37 +0200 Subject: 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 --- source/blender/blenlib/intern/task.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c index 08d40a158ca..a125bf7d8d0 100644 --- a/source/blender/blenlib/intern/task.c +++ b/source/blender/blenlib/intern/task.c @@ -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); } } } -- cgit v1.2.3