1
0

Fixed a crash in LeakFinder when out of memory

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1265 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-03-11 17:10:00 +00:00
parent e70251a7fc
commit 9931b5634b

View File

@ -427,6 +427,11 @@ public:
pHashEntry->Next = (AllocHashEntryType*) own_malloc(sizeof(AllocHashEntryType)); pHashEntry->Next = (AllocHashEntryType*) own_malloc(sizeof(AllocHashEntryType));
pHashEntry = pHashEntry->Next; pHashEntry = pHashEntry->Next;
if (pHashEntry == NULL)
{
// Exhausted the available memory?
return;
}
} }
pHashEntry->key = key; pHashEntry->key = key;
pHashEntry->nDataSize = nDataSize; pHashEntry->nDataSize = nDataSize;