]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pkcs11: Memory leak fixed in DH/ECDH implementation.
authorTobias Brunner <tobias@strongswan.org>
Wed, 2 Nov 2011 16:00:58 +0000 (17:00 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 2 Nov 2011 19:27:54 +0000 (20:27 +0100)
src/libstrongswan/plugins/pkcs11/pkcs11_dh.c

index e48f7dcfe5a85245f7e3f8c7dd576a3525e16da9..c870370c84553f4481e97473e3a111a9e0eee4f0 100644 (file)
@@ -353,8 +353,10 @@ static pkcs11_dh_t *create_ecp(diffie_hellman_group_t group, chunk_t ecparam)
        {
                if (generate_key_pair_ecp(this, ecparam))
                {
+                       chunk_free(&ecparam);
                        return &this->public;
                }
+               chunk_free(&ecparam);
                free(this);
        }
        return NULL;