- Fixed alloc/dealloc mismatch in PClass code.

The function 'PClassActor::InitializeNativeDefault' is the only one which didn't allocate the 'Defaults' member variable with M_Malloc. Reported by the Address Sanitizer.
This commit is contained in:
Edoardo Prezioso 2016-02-05 03:03:34 +01:00
parent 4751bffd5f
commit 002177e33f

View file

@ -321,7 +321,7 @@ void PClassActor::InitializeNativeDefaults()
{
Symbols.SetParentTable(&ParentClass->Symbols);
assert(Defaults == NULL);
Defaults = new BYTE[Size];
Defaults = (BYTE *)M_Malloc(Size);
if (ParentClass->Defaults != NULL)
{
memcpy(Defaults, ParentClass->Defaults, ParentClass->Size);