ccm: Destroy IV generator on crypter creation failure

Closes strongswan/strongswan#343.
This commit is contained in:
Marius Tomaschewski 2021-04-22 12:47:18 +02:00 committed by Tobias Brunner
parent a82f13e7ce
commit d654117c66
1 changed files with 1 additions and 0 deletions

View File

@ -417,6 +417,7 @@ ccm_aead_t *ccm_aead_create(encryption_algorithm_t algo,
if (!this->crypter)
{
this->iv_gen->destroy(this->iv_gen);
free(this);
return NULL;
}