App: [skip ci] AddressSanitizer: heap-use-after-free
When removing a dynamic property its myName member must be nullified as the memory has been de-allocated
This commit is contained in:
@@ -217,6 +217,8 @@ bool DynamicProperty::removeDynamicProperty(const char* name)
|
||||
GetApplication().signalRemoveDynamicProperty(*prop);
|
||||
Property::destroy(prop);
|
||||
index.erase(it);
|
||||
// memory of myName has been freed
|
||||
prop->myName = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user