1
0

More valgrind fixes

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1044 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-11-15 14:02:17 +00:00
parent 28c345a841
commit 635386faad
3 changed files with 5 additions and 6 deletions

View File

@ -51,8 +51,8 @@ cBioGenCache::cBioGenCache(cBiomeGen * a_BioGenToCache, int a_CacheSize) :
cBioGenCache::~cBioGenCache() cBioGenCache::~cBioGenCache()
{ {
delete m_CacheData; delete[] m_CacheData;
delete m_CacheOrder; delete[] m_CacheOrder;
delete m_BioGenToCache; delete m_BioGenToCache;
} }

View File

@ -51,8 +51,8 @@ cHeiGenCache::cHeiGenCache(cTerrainHeightGen * a_HeiGenToCache, int a_CacheSize)
cHeiGenCache::~cHeiGenCache() cHeiGenCache::~cHeiGenCache()
{ {
delete m_CacheData; delete[] m_CacheData;
delete m_CacheOrder; delete[] m_CacheOrder;
delete m_HeiGenToCache; delete m_HeiGenToCache;
} }

View File

@ -239,10 +239,9 @@ cSocket cSocket::Accept()
cSocket SClient = accept(m_Socket, (sockaddr*)&from, &fromlen); cSocket SClient = accept(m_Socket, (sockaddr*)&from, &fromlen);
if (from.sin_addr.s_addr && SClient.IsValid()) // Get IP in string form if (SClient.IsValid() && (from.sin_addr.s_addr != 0)) // Get IP in string form
{ {
SClient.m_IPString = inet_ntoa(from.sin_addr); SClient.m_IPString = inet_ntoa(from.sin_addr);
//LOG("cSocket::Accept() %s", SClient.m_IPString);
} }
return SClient; return SClient;