botan: Fix leak if hasher initialization fails

This commit is contained in:
Tobias Brunner
2018-09-17 18:51:41 +02:00
parent dc09570a12
commit d51a28bd5c
@@ -129,6 +129,7 @@ botan_hasher_t *botan_hasher_create(hash_algorithm_t algo)
if (botan_hash_init(&this->hash, hash_name, 0))
{
free(this);
return NULL;
}
return &this->public;