Skip to content
Permalink
Browse files

net_ssl: free certs after setting them up

  • Loading branch information...
moneromooo-monero committed May 10, 2019
1 parent c0bc6d9 commit 9a7a453f258425e4958de45c1db35a9094ec9c35
Showing with 2 additions and 2 deletions.
  1. +2 −2 contrib/epee/src/net_ssl.cpp
@@ -352,7 +352,7 @@ boost::asio::ssl::context ssl_options_t::create_context() const
MERROR("Failed to use generated EC private key for " << NID_secp256k1);
else
ok = true;
// don't free the cert, the CTX owns it now
X509_free(cert);
EVP_PKEY_free(pkey);
#endif

@@ -362,7 +362,7 @@ boost::asio::ssl::context ssl_options_t::create_context() const
MERROR("Failed to use generated RSA private key for RSA");
else
ok = true;
// don't free the cert, the CTX owns it now
X509_free(cert);
EVP_PKEY_free(pkey);

CHECK_AND_ASSERT_THROW_MES(ok, "Failed to use any generated certificate");

0 comments on commit 9a7a453

Please sign in to comment.
You can’t perform that action at this time.