ccm: Destroy IV generator on crypter creation failure

Closes strongswan/strongswan#343.
This commit is contained in:
Marius Tomaschewski
2021-05-27 17:43:03 +02:00
committed by Tobias Brunner
parent a82f13e7ce
commit d654117c66
+1
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;
}