mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
plug valgrind-found leak; prefer localtime_r.
This commit is contained in:
parent
c347bbd963
commit
9b29e45ea4
2 changed files with 8 additions and 1 deletions
|
@ -70,6 +70,12 @@ CRefMgr::~CRefMgr()
|
||||||
pthread_mutex_destroy( &m_guard );
|
pthread_mutex_destroy( &m_guard );
|
||||||
pthread_rwlock_destroy( &m_cookieMapRWLock );
|
pthread_rwlock_destroy( &m_cookieMapRWLock );
|
||||||
|
|
||||||
|
SocketMap::iterator iter;
|
||||||
|
for ( iter = m_SocketStuff.begin(); iter != m_SocketStuff.end(); ++iter ) {
|
||||||
|
SocketStuff* stuff = iter->second;
|
||||||
|
delete stuff;
|
||||||
|
}
|
||||||
|
|
||||||
s_instance = NULL;
|
s_instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,8 @@ logf( XW_LogLevel level, const char* format, ... )
|
||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday( &tv, NULL );
|
gettimeofday( &tv, NULL );
|
||||||
timp = localtime( &tv.tv_sec );
|
struct tm result;
|
||||||
|
timp = localtime_r( &tv.tv_sec, &result );
|
||||||
|
|
||||||
pthread_t me = pthread_self();
|
pthread_t me = pthread_self();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue