Commit: 81e3deadea05a847d5e6c899c72218e719d122bd
Author: Campbell Barton
Date:   Thu Jun 4 15:40:17 2015 +1000
Branches: master
https://developer.blender.org/rB81e3deadea05a847d5e6c899c72218e719d122bd

Fix for leak creating stereo images

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

M       source/blender/imbuf/intern/stereoimbuf.c

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

diff --git a/source/blender/imbuf/intern/stereoimbuf.c 
b/source/blender/imbuf/intern/stereoimbuf.c
index cf9c6b3..f1608f5 100644
--- a/source/blender/imbuf/intern/stereoimbuf.c
+++ b/source/blender/imbuf/intern/stereoimbuf.c
@@ -620,7 +620,7 @@ static void imb_stereo3d_squeeze_rectf(float *rectf, 
Stereo3dFormat *s3d, const
                width, height, width, width);
 
        IMB_scaleImBuf_threaded(ibuf, x, y);
-       rectf = MEM_dupallocN(ibuf->rect_float);
+       memcpy(rectf, ibuf->rect_float, x * y * sizeof(float[4]));
        IMB_freeImBuf(ibuf);
 }
 
@@ -645,7 +645,7 @@ static void imb_stereo3d_squeeze_rect(int *rect, 
Stereo3dFormat *s3d, const size
                width, height, width, width);
 
        IMB_scaleImBuf_threaded(ibuf, x, y);
-       rect = MEM_dupallocN(ibuf->rect);
+       memcpy(rect, ibuf->rect, x * y * sizeof(unsigned int));
        IMB_freeImBuf(ibuf);
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to