]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/lib/Item.cpp
Security-58286.240.4.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / Item.cpp
index ff064c1a07f5446f4eeeed344d1b6548d0bd05c7..2ec227ef090dee51d57673381f5aea79654ca951 100644 (file)
@@ -196,14 +196,22 @@ ItemImpl::ItemImpl(ItemImpl &item) :
 }
 
 ItemImpl::~ItemImpl()
-{
+try {
        if (secd_PersistentRef) {
                CFRelease(secd_PersistentRef);
        }
+} catch (...) {
+#ifndef NDEBUG
+    /* if we get an exception in destructor, presumably the mutex, lets throw if we
+     * are in a debug build (ie reach end of block) */
+#else
+    return;
+#endif
 }
 
 
 
+
 Mutex*
 ItemImpl::getMutexForObject() const
 {