pkcs11: Memory leak fixed in DH/ECDH implementation.

This commit is contained in:
Tobias Brunner
2011-11-02 20:27:54 +01:00
parent 43cd036a77
commit 817d165cbc
@@ -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)) if (generate_key_pair_ecp(this, ecparam))
{ {
chunk_free(&ecparam);
return &this->public; return &this->public;
} }
chunk_free(&ecparam);
free(this); free(this);
} }
return NULL; return NULL;