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:
authorMichael <michael64>2021-12-15 17:45:50 +0300
committerJeroen Bakker <jeroen@blender.org>2021-12-15 17:46:28 +0300
commit5f52684a0f13bf265308af299b9e23214f3d2300 (patch)
tree96c56061d8444e15139ecc62e1afa1a1c5b012fb /source/blender/compositor
parent1a833dbdb9c4ec4e19fcd900b1a98a89d1d95a8c (diff)
Initialize the fourth and final instance variable of MemoryProxy
The constructor of MemoryProxy initializes 3 of 4 instances variables. If a MemoryProxy is constructed and MemoryProxy::free is called on this instance, buffer_ is undefined and 'delete buffer_;' causes errors. Although this misuse pattern does not exist in the current codebase it already tripped up the Address Sanitizer on various occasions while debugging unrelated problems. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13569
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cc b/source/blender/compositor/intern/COM_MemoryProxy.cc
index 895990bc87f..6263c47fc9e 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cc
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cc
@@ -25,6 +25,7 @@ MemoryProxy::MemoryProxy(DataType datatype)
{
write_buffer_operation_ = nullptr;
executor_ = nullptr;
+ buffer_ = nullptr;
datatype_ = datatype;
}