pkcs11: Properly destroy mutex in pkcs11_hasher if no token found.

This commit is contained in:
Tobias Brunner
2011-10-31 18:45:29 +01:00
parent 7c57867ebd
commit deba3da5b0
@@ -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;
}