X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..79b9da22a1f4b26279940d285c1bc28ce4e99252:/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp diff --git a/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp b/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp index ce83b5e2..1fd0e6e8 100644 --- a/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp +++ b/OSX/libsecurity_cdsa_client/lib/cssmclient.cpp @@ -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)