diff options
author | Michael <michael64> | 2021-12-15 17:45:50 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-12-15 17:46:28 +0300 |
commit | 5f52684a0f13bf265308af299b9e23214f3d2300 (patch) | |
tree | 96c56061d8444e15139ecc62e1afa1a1c5b012fb /source/blender | |
parent | 1a833dbdb9c4ec4e19fcd900b1a98a89d1d95a8c (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')
-rw-r--r-- | source/blender/compositor/intern/COM_MemoryProxy.cc | 1 |
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; } |