diff options
-rw-r--r-- | qpid/cpp/src/qpid/SaslFactory.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/SaslFactory.cpp b/qpid/cpp/src/qpid/SaslFactory.cpp index bd771fc920..f5b2b0108f 100644 --- a/qpid/cpp/src/qpid/SaslFactory.cpp +++ b/qpid/cpp/src/qpid/SaslFactory.cpp @@ -603,8 +603,10 @@ namespace { class SecretsMap { typedef std::map<sasl_conn_t*, void*> Map; Map map; + sys::Mutex lock; public: void keep(sasl_conn_t* conn, void* secret) { + sys::Mutex::ScopedLock l(lock); Map::iterator i = map.find(conn); if (i != map.end()) free(i->second); map[conn] = secret; |