diff --git a/Crypto/src/RSAKeyImpl.cpp b/Crypto/src/RSAKeyImpl.cpp index 2fbd555f2..5e8ab31fd 100644 --- a/Crypto/src/RSAKeyImpl.cpp +++ b/Crypto/src/RSAKeyImpl.cpp @@ -37,6 +37,7 @@ RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert): const X509* pCert = cert.certificate(); EVP_PKEY* pKey = X509_get_pubkey(const_cast(pCert)); _pRSA = EVP_PKEY_get1_RSA(pKey); + EVP_PKEY_free(pKey); }