aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-10-24 16:36:55 +0200
committerTobias Brunner <tobias@strongswan.org>2011-10-31 18:45:29 +0100
commitdeba3da5b039144458177c1621cafabd71ebd27d (patch)
treefe37e5b30602d208cdcbae0b41eec97663b92f48
parent7c57867ebde0e40a310bef269b4590eb48ae7cbf (diff)
downloadstrongswan-deba3da5b039144458177c1621cafabd71ebd27d.tar.bz2
strongswan-deba3da5b039144458177c1621cafabd71ebd27d.tar.xz
pkcs11: Properly destroy mutex in pkcs11_hasher if no token found.
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c b/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
index 5da9700bd..069fa98b6 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;
}