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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-09-03 16:30:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-09-03 16:30:33 +0300
commitc6bbe6c5aac29a4d36eb3aedd488ca4deac68fb7 (patch)
tree3e6ad4ac992c7f67ec4f6dc9ea4493353fd52f2f /source
parent107f1c0a2b0dec16adb729801cc03614acc7ab82 (diff)
Fix (unreported) potentially giant memory leak in Cloth collision solver.
Not freeing its BVHTree in case there were no collision objects, could quickly lead to hundreds of MB of memleak!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/collision.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index b38d6b8bceb..65c84187307 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1357,6 +1357,7 @@ void cloth_find_point_contacts(Object *ob, ClothModifierData *clmd, float step,
if (!collobjs) {
*r_collider_contacts = NULL;
*r_totcolliders = 0;
+ BLI_bvhtree_free(cloth_bvh);
return;
}