Fix #117887: fix asan alloc-dealloc-mismatch

Pull Request: https://projects.blender.org/blender/blender/pulls/117891
This commit is contained in:
Jacques Lucke
2024-02-06 13:49:36 +01:00
parent 9958cbf614
commit 74971e06f0

View File

@@ -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;
}