More valgrind fixes
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1044 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
28c345a841
commit
635386faad
@ -51,8 +51,8 @@ cBioGenCache::cBioGenCache(cBiomeGen * a_BioGenToCache, int a_CacheSize) :
|
||||
|
||||
cBioGenCache::~cBioGenCache()
|
||||
{
|
||||
delete m_CacheData;
|
||||
delete m_CacheOrder;
|
||||
delete[] m_CacheData;
|
||||
delete[] m_CacheOrder;
|
||||
delete m_BioGenToCache;
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,8 @@ cHeiGenCache::cHeiGenCache(cTerrainHeightGen * a_HeiGenToCache, int a_CacheSize)
|
||||
|
||||
cHeiGenCache::~cHeiGenCache()
|
||||
{
|
||||
delete m_CacheData;
|
||||
delete m_CacheOrder;
|
||||
delete[] m_CacheData;
|
||||
delete[] m_CacheOrder;
|
||||
delete m_HeiGenToCache;
|
||||
}
|
||||
|
||||
|
@ -239,10 +239,9 @@ cSocket cSocket::Accept()
|
||||
|
||||
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);
|
||||
//LOG("cSocket::Accept() %s", SClient.m_IPString);
|
||||
}
|
||||
|
||||
return SClient;
|
||||
|
Loading…
Reference in New Issue
Block a user