diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-31 11:00:59 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-31 11:00:59 +0400 |
commit | b3e87146b64773d50062ae0fd5b887055d71c7a6 (patch) | |
tree | 187205241fecdecbbd9dc23f33849934c43cf6a1 /source/blender/nodes/intern | |
parent | 8616d22dc33d63d22a2d7e779a38f8953c0917ef (diff) |
Fix [#21826] Memory Map growing in size on each render
Image node wasn't properly getting marked to free compbuf data when using premul.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_image.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c index f53e3d2ba8f..0bbf9c9bf85 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c @@ -231,9 +231,12 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b /*first duplicate stackbuf->rect, since it's just a pointer to the source imbuf, and we don't want to change that.*/ stackbuf->rect = MEM_dupallocN(stackbuf->rect); - + + /* since stackbuf now has allocated memory, rather than just a pointer, + * mark it as allocated so it can be freed properly */ + stackbuf->malloc=1; + /*premul the image*/ - pixel = stackbuf->rect; for (i=0; i<stackbuf->x*stackbuf->y; i++, pixel += 4) { pixel[0] *= pixel[3]; |