From: Tobias Brunner Date: Mon, 24 Oct 2011 14:36:55 +0000 (+0200) Subject: pkcs11: Properly destroy mutex in pkcs11_hasher if no token found. X-Git-Tag: 4.6.0~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=deba3da5b039144458177c1621cafabd71ebd27d;p=thirdparty%2Fstrongswan.git pkcs11: Properly destroy mutex in pkcs11_hasher if no token found. --- 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; }