From 81e3deadea05a847d5e6c899c72218e719d122bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Jun 2015 15:40:17 +1000 Subject: Fix for leak creating stereo images --- source/blender/imbuf/intern/stereoimbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c index cf9c6b388ff..f1608f56c0b 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); } -- cgit v1.2.3