[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43655] branches/bmesh/blender/source/ blender/modifiers/intern/MOD_mirror.c: fix leak in mirror modifier.

Campbell Barton ideasman42 at gmail.com
Tue Jan 24 01:26:17 CET 2012


Revision: 43655
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43655
Author:   campbellbarton
Date:     2012-01-24 00:26:12 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
fix leak in mirror modifier.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2012-01-23 23:53:21 UTC (rev 43654)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2012-01-24 00:26:12 UTC (rev 43655)
@@ -274,10 +274,14 @@
 		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);



More information about the Bf-blender-cvs mailing list