]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cdsa_client/lib/cssmclient.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_client / lib / cssmclient.cpp
index ce83b5e2226831295154d71175703d650164fde3..bf2fccfa8bf6035472b522616cd83ae2178c2f88 100644 (file)
@@ -38,7 +38,7 @@ using namespace CssmClient;
 // Exception model
 //
 const char *
-Error::what () const throw()
+Error::what () const _NOEXCEPT
 {
        return "CSSM client library error";
 }
@@ -89,7 +89,7 @@ try
 }
 catch(...)
 {
-       return;
+    return;    // Prevent re-throw of exception [function-try-block]
 }
 
 void
@@ -111,6 +111,7 @@ ObjectImpl::removeChild()
 Allocator &
 ObjectImpl::allocator() const
 {
+    StLock<Mutex> _(mAllocatorMutex);
        if (mAllocator == NULL)
        {
                // fix allocator now
@@ -126,6 +127,7 @@ ObjectImpl::allocator() const
 void
 ObjectImpl::allocator(Allocator &alloc)
 {
+    StLock<Mutex> _(mAllocatorMutex);
        assert(mAllocator == NULL);     // cannot redefine allocator once set
        mAllocator = &alloc;
 }
@@ -456,9 +458,13 @@ AttachmentImpl::AttachmentImpl(const Module &module, CSSM_SERVICE_TYPE subservic
 }
 
 AttachmentImpl::~AttachmentImpl()
+try
 {
        detach();
 }
+catch (...) {
+    return;
+}
 
 void
 AttachmentImpl::make(CSSM_SERVICE_TYPE subserviceType)