From: Tobias Brunner Date: Wed, 2 Nov 2011 16:00:58 +0000 (+0100) Subject: pkcs11: Memory leak fixed in DH/ECDH implementation. X-Git-Tag: 4.6.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=817d165cbc49d42fb1ace3161b362ba4f2bd3dd5;p=thirdparty%2Fstrongswan.git pkcs11: Memory leak fixed in DH/ECDH implementation. --- diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_dh.c b/src/libstrongswan/plugins/pkcs11/pkcs11_dh.c index e48f7dcfe5..c870370c84 100644 --- a/src/libstrongswan/plugins/pkcs11/pkcs11_dh.c +++ b/src/libstrongswan/plugins/pkcs11/pkcs11_dh.c @@ -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;