Tier1: fix CUtlMemoryPool::CBlob structure

Only contains the 'previous' pointer, freeing memory now works.
This commit is contained in:
Kawe Mazidjatari 2024-01-12 00:16:36 +01:00
parent 8d4ca8a59f
commit 05f12ab6cc
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ protected:
class CBlob
{
public:
CBlob* m_pPrev, * m_pNext;
CBlob* m_pPrev;
int m_NumBytes; // Number of bytes in this blob.
char m_Data[1];
char m_Padding[3]; // to int align the struct

View File

@ -214,7 +214,7 @@ void CUtlMemoryPool::AddNewBlob()
// Link it in at the end of the blob list.
pBlob->m_NumBytes = blobSize;
pBlob->m_pNext = m_pNext;
pBlob->m_pPrev = m_pNext;
m_pNext = pBlob;
m_pPrev = (CBlob*)AlignValue(pBlob->m_Data, m_nAlignment);