botan: Fix leak if hasher initialization fails
This commit is contained in:
@@ -129,6 +129,7 @@ botan_hasher_t *botan_hasher_create(hash_algorithm_t algo)
|
|||||||
|
|
||||||
if (botan_hash_init(&this->hash, hash_name, 0))
|
if (botan_hash_init(&this->hash, hash_name, 0))
|
||||||
{
|
{
|
||||||
|
free(this);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return &this->public;
|
return &this->public;
|
||||||
|
|||||||
Reference in New Issue
Block a user