diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-28 14:07:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-28 14:07:58 +0300 |
commit | 5a8dcdd24e7947f0c298bb78d9ebd9a4d21423ec (patch) | |
tree | b090552c4238bc85a8babc9e07078268fd4603ff /source | |
parent | 9d1cab2eba0a839ce965de40eaedec8f6dc45276 (diff) |
Fix T62944: Memory leak in animation playback
Missing memory free in the early output of particles distribute
initialization.
Seems it was always there.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index fc3c998ca1c..fc8292531dc 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -1055,6 +1055,14 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti if (totmapped == 0) { /* We are not allowed to distribute particles anywhere... */ + if (mesh != final_mesh) { + BKE_id_free(NULL, mesh); + } + BLI_kdtree_3d_free(tree); + BLI_rng_free(rng); + MEM_freeN(element_weight); + MEM_freeN(particle_element); + MEM_freeN(jitter_offset); return 0; } |