diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-03 16:30:33 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-03 16:30:33 +0300 |
commit | c6bbe6c5aac29a4d36eb3aedd488ca4deac68fb7 (patch) | |
tree | 3e6ad4ac992c7f67ec4f6dc9ea4493353fd52f2f | |
parent | 107f1c0a2b0dec16adb729801cc03614acc7ab82 (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!
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 1 |
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; } |