From e236fb157a74b2db0697cfa73def98b3fe755fc9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Jan 2012 00:26:12 +0000 Subject: fix leak in mirror modifier. --- source/blender/modifiers/intern/MOD_mirror.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_mirror.c') diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 37800d3cce5..c382dfa7d14 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -274,10 +274,14 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, for (i = maxVerts; i-- > 0; dvert++) { defvert_flip(dvert, flip_map, flip_map_len); } + + MEM_freeN(flip_map); } if (do_vtargetmap) { - if (is_vtargetmap) { /* slow - so only call if one or more merge verts are found */ + /* slow - so only call if one or more merge verts are found, + * users may leave this on and not realize there is nothing to merge - campbell */ + if (is_vtargetmap) { result = CDDM_merge_verts(result, vtargetmap); } MEM_freeN(vtargetmap); -- cgit v1.2.3