crypto: fix memory leak in PublicKeyCipher::Cipher

PR-URL: https://github.com/nodejs/node/pull/2375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Karl Skomski authored and Ben Noordhuis committed 2015-08-17 21:23:11 +02:00
1 parent dbecb21270
commit 4b61cb0a3a
1 file changed
+2
+2
View File
@@ -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)