Fix #117887: fix asan alloc-dealloc-mismatch
Pull Request: https://projects.blender.org/blender/blender/pulls/117891
This commit is contained in:
@@ -308,7 +308,7 @@ class Any {
|
||||
}
|
||||
else {
|
||||
/* Using #malloc so that the #unique_ptr can free the memory. */
|
||||
T *value = static_cast<T *>(malloc(sizeof(T)));
|
||||
T *value = static_cast<T *>(::operator new(sizeof(T)));
|
||||
new (&buffer_) std::unique_ptr<T>(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user