Fix race condition during shutdown.
authorScott Cantor <cantor.2@osu.edu>
Fri, 2 Apr 2010 00:03:14 +0000 (00:03 +0000)
committerScott Cantor <cantor.2@osu.edu>
Fri, 2 Apr 2010 00:03:14 +0000 (00:03 +0000)
saml/saml2/metadata/impl/XMLMetadataProvider.cpp

index 9c1c6b6..be76358 100644 (file)
@@ -53,7 +53,12 @@ namespace opensaml {
                     m_object(NULL), m_maxCacheDuration(m_reloadInterval) {
             }
             virtual ~XMLMetadataProvider() {
+                if (m_lock)
+                    m_lock->wrlock();
                 delete m_object;
+                m_object = NULL;
+                if (m_lock)
+                    m_lock->unlock();
             }
 
             void init() {