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
This commit is contained in:
parent
1a833dbdb9
commit
5f52684a0f
|
@ -25,6 +25,7 @@ MemoryProxy::MemoryProxy(DataType datatype)
|
|||
{
|
||||
write_buffer_operation_ = nullptr;
|
||||
executor_ = nullptr;
|
||||
buffer_ = nullptr;
|
||||
datatype_ = datatype;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue