diff options
author | Julian Eisel <julian@blender.org> | 2022-01-14 21:08:02 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-14 21:26:04 +0300 |
commit | 41495707d207db94db238e0bce5bd2dd90cbdbef (patch) | |
tree | 20fb53414a5efa318722ae721c71c98a02fbd878 /source/blender/editors/space_outliner | |
parent | 82d5905e4b146685ad577f7bb4909535abbb6cd7 (diff) |
Fix incorrect destruction of Outliner tree-elements
`TreeElement` isn't a trivial type anymore, so `MEM_delete()` should be
called, which calls the destructor.
AFAICS this would cause a memory leak, since the contained `unique_ptr`
is allocated but not destructed correctly - but it's not using the
guarded allocator so woudn't be reported.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index 5f378a02052..92e12756b16 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -218,7 +218,7 @@ void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree) MEM_freeN((void *)element->name); } element->type = nullptr; - MEM_freeN(element); + MEM_delete(element); } /* ********************************************************* */ |