[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13698] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_image.c: Fix for theoretical memory leak.
Joseph Eagar
joeedh at gmail.com
Fri Feb 15 10:42:26 CET 2008
Revision: 13698
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13698
Author: joeedh
Date: 2008-02-15 10:42:25 +0100 (Fri, 15 Feb 2008)
Log Message:
-----------
Fix for theoretical memory leak. Oddly this leak didn't seem
to be happening, but might as well fix it anyway.
Modified Paths:
--------------
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2008-02-15 06:06:08 UTC (rev 13697)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2008-02-15 09:42:25 UTC (rev 13698)
@@ -211,8 +211,10 @@
to the source imbuf, and we don't want to change that.*/
stackbuf->rect = MEM_dupallocN(stackbuf->rect);
- /*premul the image*/
+ /*flag that we can free the buffer.*/
+ stackbuf->malloc = 1;
+ /*premul the image*/
pixel = stackbuf->rect;
for (i=0; i<stackbuf->x*stackbuf->y; i++, pixel += 4) {
pixel[0] *= pixel[3];
More information about the Bf-blender-cvs
mailing list