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:
authorSergey Sharybin <sergey@blender.org>2021-11-01 17:36:09 +0300
committerSergey Sharybin <sergey@blender.org>2021-11-01 17:36:09 +0300
commit64de6ad4fe4ada417869c936106f184e455b848d (patch)
tree269991d54d74407619a89518421f94a14a3ceac5 /source/blender/blenkernel/intern/image.c
parent2fb725ea3085b4a8ca6eb6417a3372f7af26bc39 (diff)
Fix use-after-free in image code
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index cdc8b15f744..5d53fe3e5fe 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -5343,9 +5343,10 @@ void BKE_image_pool_free(ImagePool *pool)
BLI_mutex_unlock(&pool->mutex);
BLI_mempool_destroy(pool->memory_pool);
- MEM_freeN(pool);
BLI_mutex_end(&pool->mutex);
+
+ MEM_freeN(pool);
}
BLI_INLINE ImBuf *image_pool_find_item(