From 3b57819b5887870b5a34c86b3ac9889dd92b9b0f Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 6 Mar 2015 22:51:03 -0500 Subject: [PATCH] crypto: fix leak in SafeX509ExtPrint `ASN1_item_d2i`'s return value must be freed by the owner. Fix: https://github.com/iojs/io.js/issues/1075 PR-URL: https://github.com/iojs/io.js/pull/1087 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 912320771e3f65..a650d4fef70cbd 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1132,6 +1132,7 @@ static bool SafeX509ExtPrint(BIO* out, X509_EXTENSION* ext) { X509V3_EXT_val_prn(out, nval, 0, 0); } } + sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free); return true; }