Browse Source

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 <info@bnoordhuis.nl>
v1.8.0-commit
Fedor Indutny 10 years ago
parent
commit
3b57819b58
  1. 1
      src/node_crypto.cc

1
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;
}

Loading…
Cancel
Save