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:
authorJacques Lucke <jacques@blender.org>2020-07-18 11:06:36 +0300
committerJacques Lucke <jacques@blender.org>2020-07-18 11:06:36 +0300
commit63db971a0047a16ec6f5bb2708f7b4425223b76c (patch)
treee8a95efd2465725ad9f709e648072ce26e2909e6 /source/blender/blenloader/intern/writefile.c
parent1dd381828fa3f0f642086bc2bfa0c7d65efbeecb (diff)
Simulation: fix memory leak
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 4e2b4fef9a0..8b9de3eea24 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3850,6 +3850,10 @@ static void write_simulation(BlendWriter *writer, Simulation *simulation, const
layers,
CD_MASK_ALL);
+ if (layers != NULL && layers != layers_buff) {
+ MEM_freeN(layers);
+ }
+
write_pointcaches(writer, &particle_state->ptcaches);
break;
}