mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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:
1 parent
dbecb21270
commit
4b61cb0a3a
1 file changed
+2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user