qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1541144 - /qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp
Date Tue, 12 Nov 2013 16:58:29 GMT
Author: aconway
Date: Tue Nov 12 16:58:29 2013
New Revision: 1541144

URL: http://svn.apache.org/r1541144
Log:
QPID-5275: Segmentation fault in SaslFactory.

Discovered while working on QPID-5275: SecretsMap in SaslFactory.cpp was thread
unsafe, added a mutex.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp?rev=1541144&r1=1541143&r2=1541144&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp Tue Nov 12 16:58:29 2013
@@ -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;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message