ccm: Destroy IV generator on crypter creation failure
Closes strongswan/strongswan#343.
This commit is contained in:
parent
a82f13e7ce
commit
d654117c66
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue