Browse Source

crypto: fix memory leak in PublicKeyCipher::Cipher

PR-URL: https://github.com/nodejs/node/pull/2375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v4.0.0-rc
Karl Skomski 10 years ago
committed by Ben Noordhuis
parent
commit
4b61cb0a3a
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -3933,6 +3933,8 @@ bool PublicKeyCipher::Cipher(const char* key_pem,
fatal = false;
exit:
if (x509 != nullptr)
X509_free(x509);
if (pkey != nullptr)
EVP_PKEY_free(pkey);
if (bp != nullptr)

Loading…
Cancel
Save