Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-10-18 15:39:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-10-18 15:39:37 +0300
commitf56392f224e6a7fa6b551d10006bea8bb08ebc6c (patch)
tree5de97a393abd2043bf31eac841e2c66c59253da5
parent5551948b31691aa1ce817d78c13c173823a4dd6c (diff)
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
-rw-r--r--source/blender/blenlib/intern/task.c1
1 files changed, 0 insertions, 1 deletions
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);
}
}
}