From deba3da5b039144458177c1621cafabd71ebd27d Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 24 Oct 2011 16:36:55 +0200 Subject: [PATCH] pkcs11: Properly destroy mutex in pkcs11_hasher if no token found. --- src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c b/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c index 5da9700bd3..069fa98b6d 100644 --- a/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c +++ b/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c @@ -315,6 +315,7 @@ pkcs11_hasher_t *pkcs11_hasher_create(hash_algorithm_t algo) this->lib = find_token(algo, &this->session, &this->mech, &this->size); if (!this->lib) { + this->mutex->destroy(this->mutex); free(this); return NULL; } -- 2.47.2