Fix use-after-free in image code

This commit is contained in:
Sergey Sharybin 2021-11-01 15:36:09 +01:00
parent 2fb725ea30
commit 64de6ad4fe
1 changed files with 2 additions and 1 deletions

View File

@ -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(