[Bf-blender-cvs] [fe9e3ff97fc] greasepencil-object: Fix memory leak for RNG

Antonio Vazquez noreply at git.blender.org
Tue Jun 19 16:58:33 CEST 2018


Commit: fe9e3ff97fcb688ab4fd1208b1d1e799930ab995
Author: Antonio Vazquez
Date:   Tue Jun 19 16:58:11 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBfe9e3ff97fcb688ab4fd1208b1d1e799930ab995

Fix memory leak for RNG

After last changes in random number generation, there was a memory leak.

===================================================================

M	source/blender/editors/gpencil/gpencil_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 7505e4d3558..41228bb5f3b 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2259,7 +2259,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op)
 		ED_gpencil_toggle_brush_cursor(C, true, NULL);
 
 		/* finally, free the temp data */
-		MEM_freeN(p);
+		gp_session_free(p);
 	}
 
 	op->customdata = NULL;



More information about the Bf-blender-cvs mailing list