Fix T62944: Memory leak in animation playback

Missing memory free in the early output of particles distribute
initialization.

Seems it was always there.
This commit is contained in:
Sergey Sharybin
2019-03-28 12:07:58 +01:00
parent 9d1cab2eba
commit 5a8dcdd24e

View File

@@ -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;
}