Sculpt: fix memory leak with anchored stroke option.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Mar 2010 13:24:41 +0000 (13:24 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Mar 2010 13:24:41 +0000 (13:24 +0000)
source/blender/editors/sculpt_paint/sculpt.c

index effe3cb14284225faa7ae4fe8bd2be9f7ae9a72b..a24e9d8666671b8465ab00c942ffc4b7ce48363d 100644 (file)
@@ -1988,6 +1988,9 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
                        for(i = 0; i < ss->totface; ++i, fn += 3)
                                copy_v3_v3(fn, cache->face_norms[i]);
                }
+
+               if(nodes)
+                       MEM_freeN(nodes);
        }
 }