botan: Fix leak if hasher initialization fails

This commit is contained in:
Tobias Brunner 2018-09-17 17:59:55 +02:00
parent dc09570a12
commit d51a28bd5c
1 changed files with 1 additions and 0 deletions

View File

@ -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;