]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ccm: Destroy IV generator on crypter creation failure
authorMarius Tomaschewski <mt@suse.de>
Thu, 22 Apr 2021 10:47:18 +0000 (12:47 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 May 2021 15:43:03 +0000 (17:43 +0200)
Closes strongswan/strongswan#343.

src/libstrongswan/plugins/ccm/ccm_aead.c

index 9cf9bedf54cabe41c2cb2dbfcaecc1c6d803b90e..16c5b71e1c9c59354341dbb82219cccca33f7c32 100644 (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;
        }