diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-11-01 17:36:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-11-01 17:36:09 +0300 |
commit | 64de6ad4fe4ada417869c936106f184e455b848d (patch) | |
tree | 269991d54d74407619a89518421f94a14a3ceac5 /source/blender/blenkernel/intern | |
parent | 2fb725ea3085b4a8ca6eb6417a3372f7af26bc39 (diff) |
Fix use-after-free in image code
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 3 |
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( |