Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-28 02:09:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-28 02:09:24 +0400
commitb76176fafffdd9b9f3e43bda994c588cd91a071d (patch)
tree2168e85cea4a0084ad08852d0b7820590a4ca8eb /source/blender/nodes
parentcc70bffb62d8b7c1dcfc0c389b8fcd43699680b0 (diff)
patch [#23537] Memory leak in compositor rotate node
from Jeroen Bakker (jbakker)
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_rotate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
index 4103981af46..ccb1d8abfd9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
@@ -71,7 +71,7 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0);
obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0, 0);
- if(ibuf){
+ if(ibuf && obuf){
ibuf->rect_float=cbuf->rect;
obuf->rect_float=stackbuf->rect;
@@ -103,6 +103,9 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
centx= (float)cbuf->xof; centy= (float)cbuf->yof;
stackbuf->xof= (int)( c*centx + s*centy);
stackbuf->yof= (int)(-s*centx + c*centy);
+
+ IMB_freeImBuf(ibuf);
+ IMB_freeImBuf(obuf);
}
/* pass on output and free */