Porting changes from 1.2 branch
[shibboleth/sp.git] / shib / ShibConfig.cpp
index 8eefc9f..4372d77 100644 (file)
@@ -92,7 +92,7 @@ extern "C" void openssl_locking_callback(int mode,int n,const char *file,int lin
 #ifndef WIN32
 extern "C" unsigned long openssl_thread_id(void)
 {
-    return static_cast<unsigned long>(pthread_self());
+    return (unsigned long)(pthread_self());
 }
 #endif
 
@@ -118,6 +118,7 @@ void ShibConfig::term()
     CRYPTO_set_locking_callback(NULL);
     for (vector<Mutex*>::iterator i=g_openssl_locks.begin(); i!=g_openssl_locks.end(); i++)
         delete (*i);
+    g_openssl_locks.clear();
 }
 
 void PlugManager::regFactory(const char* type, Factory* factory)