Fix race condition during shutdown.
authorcantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Fri, 2 Apr 2010 00:03:14 +0000 (00:03 +0000)
committercantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Fri, 2 Apr 2010 00:03:14 +0000 (00:03 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/branches/REL_2@542 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0

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() {