projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
689e1fa
)
crypto: fix memory leak in LoadPKCS12
author
Fedor Indutny
<fedor@indutny.com>
Sat, 6 Feb 2016 04:13:36 +0000
(23:13 -0500)
committer
Myles Borins
<mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000
(14:01 -0800)
`sk_X509_pop_free` should be used instead of `sk_X509_free` to free all
items in queue too, not just the queue itself.
PR-URL: https://github.com/nodejs/node/pull/5109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
src/node_crypto.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto.cc
b/src/node_crypto.cc
index
fdbd1c6
..
7b48f30
100644
(file)
--- a/
src/node_crypto.cc
+++ b/
src/node_crypto.cc
@@
-1009,7
+1009,7
@@
void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
if (cert != nullptr)
X509_free(cert);
if (extra_certs != nullptr)
- sk_X509_
free(extra_certs
);
+ sk_X509_
pop_free(extra_certs, X509_free
);
PKCS12_free(p12);
BIO_free_all(in);