Commit: 4f0ec3cea5732e5b06122519538488e104c7ff00
Author: Campbell Barton
Date:   Mon Sep 6 20:32:35 2021 +1000
Branches: master
https://developer.blender.org/rB4f0ec3cea5732e5b06122519538488e104c7ff00

Cleanup: use pre-calculated size variable

Oversight in a0912ff5663b950222ef00485a3853bfb6001db4

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

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

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

diff --git a/source/blender/imbuf/intern/allocimbuf.c 
b/source/blender/imbuf/intern/allocimbuf.c
index c2bff9ddc51..1369f8cc0f8 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -484,7 +484,7 @@ struct ImBuf *IMB_allocFromBuffer(const unsigned int *rect,
   /* Avoid #MEM_dupallocN since the buffers might not be allocated using 
guarded-allocation. */
   if (rectf) {
     const size_t size = sizeof(float[4]) * w * h;
-    ibuf->rect_float = MEM_mallocN(sizeof(float[4]) * w * h, __func__);
+    ibuf->rect_float = MEM_mallocN(size, __func__);
     memcpy(ibuf->rect_float, rectf, size);
 
     ibuf->flags |= IB_rectfloat;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to