[Bf-blender-cvs] [67e0a44e619] master: Replace freeing checks with MEM_SAFE_FREE

Joshua Leung noreply at git.blender.org
Mon Oct 16 13:59:41 CEST 2017


Commit: 67e0a44e619685aece11f4ebedb7862ed024760f
Author: Joshua Leung
Date:   Tue Oct 17 00:44:20 2017 +1300
Branches: master
https://developer.blender.org/rB67e0a44e619685aece11f4ebedb7862ed024760f

Replace freeing checks with MEM_SAFE_FREE

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

M	source/blender/blenkernel/intern/fcurve.c

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

diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index db6c533ab57..aee465ad0a0 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -86,12 +86,11 @@ void free_fcurve(FCurve *fcu)
 		return;
 
 	/* free curve data */
-	if (fcu->bezt) MEM_freeN(fcu->bezt);
-	if (fcu->fpt)  MEM_freeN(fcu->fpt);
+	MEM_SAFE_FREE(fcu->bezt);
+	MEM_SAFE_FREE(fcu->fpt);
 	
 	/* free RNA-path, as this were allocated when getting the path string */
-	if (fcu->rna_path)
-		MEM_freeN(fcu->rna_path);
+	MEM_SAFE_FREE(fcu->rna_path);
 	
 	/* free extra data - i.e. modifiers, and driver */
 	fcurve_free_driver(fcu);



More information about the Bf-blender-cvs mailing list