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 e48f7dc..c870370 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;