From 4fa6e8b423f4d669409765966632c3ba3669d4a2 Mon Sep 17 00:00:00 2001 From: Cristian Thiago Moecke Date: Mon, 28 Jul 2014 08:32:09 -0300 Subject: [PATCH] FIx to memleak on RSAImpl (#502) --- Crypto/src/RSAKeyImpl.cpp | 1 + 1 file changed, 1 insertion(+) 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); }