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>2019-06-05 00:20:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-06-05 00:51:03 +0300
commit30d9366d17328a5f15a32e537c0a2969ea82bd3f (patch)
tree6320bc0c26794955b589bc6987026b11d0e5a0c3 /source/blender
parentb640265f77632a1d4b58be24171eb3354cc44c97 (diff)
Fix (unreported) Broken `BLI_threadapi_exit()`.
Function would not clear the static scheduler pointer, which lead to crash (mem use after free) when trying to re-init and use the task API again. Should not happen in Blender itself, but could in other cases (like some future gtests ;) ).
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/threads.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index abd59dac891..978dee319b4 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -161,6 +161,7 @@ void BLI_threadapi_exit(void)
{
if (task_scheduler) {
BLI_task_scheduler_free(task_scheduler);
+ task_scheduler = NULL;
}
BLI_spin_end(&_malloc_lock);
}