X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..HEAD:/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp?ds=sidebyside diff --git a/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp b/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp index ce83b5e2..bf2fccfa 100644 --- a/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp +++ b/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp @@ -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 _(mAllocatorMutex); if (mAllocator == NULL) { // fix allocator now @@ -126,6 +127,7 @@ ObjectImpl::allocator() const void ObjectImpl::allocator(Allocator &alloc) { + StLock _(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)