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:
authorAntonioya <blendergit@gmail.com>2019-02-27 17:59:40 +0300
committerAntonioya <blendergit@gmail.com>2019-02-27 17:59:55 +0300
commit4cd7dc6860a63d96b484372818c024b2cdd6379b (patch)
tree741dfb17a729d2b6279c347fbf6916da9d26e694 /source/blender/draw/engines/gpencil/gpencil_engine.c
parent665d987e7ba6a5037b7c14e84433a0854f2b5f77 (diff)
GPencil: Fix memory leak issue
After a previous commit to use unique identifiers for Ghash key, I had missed to free the memory of the name key. Thanks to Jacques Lucke for detecting the leak.
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 16d90b261bd..5112ba101a9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -666,7 +666,7 @@ void GPENCIL_cache_finish(void *vedata)
DRW_gpencil_populate_particles(&e_data, gh_objects, vedata);
/* free hash */
- BLI_ghash_free(gh_objects, NULL, NULL);
+ BLI_ghash_free(gh_objects, MEM_freeN, NULL);
}
if (stl->g_data->session_flag & (GP_DRW_PAINT_IDLE | GP_DRW_PAINT_FILLING)) {
@@ -719,6 +719,7 @@ static void gpencil_free_obj_runtime(GPENCIL_StorageList *stl)
/* free shgrp array */
cache_ob->tot_layers = 0;
+ MEM_SAFE_FREE(cache_ob->name);
MEM_SAFE_FREE(cache_ob->shgrp_array);
}