[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43681] trunk/blender/source/blender/ blenkernel/intern/particle_system.c: fix for memory leak when particles have 0 elements.

Campbell Barton ideasman42 at gmail.com
Tue Jan 24 21:33:38 CET 2012


Revision: 43681
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43681
Author:   campbellbarton
Date:     2012-01-24 20:33:26 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
fix for memory leak when particles have 0 elements.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/particle_system.c

Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c	2012-01-24 20:19:26 UTC (rev 43680)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c	2012-01-24 20:33:26 UTC (rev 43681)
@@ -1126,6 +1126,9 @@
 			fprintf(stderr,"Particle distribution error: Nothing to emit from!\n");
 
 		if(dm != finaldm) dm->release(dm);
+
+		BLI_kdtree_free(tree);
+
 		return 0;
 	}
 



More information about the Bf-blender-cvs mailing list