Skip to content

Commit

Permalink
crypto: fix leak in SafeX509ExtPrint
Browse files Browse the repository at this point in the history
`ASN1_item_d2i`'s return value must be freed by the owner.

Fix: #1075
PR-URL: #1087
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
indutny committed Mar 7, 2015
1 parent 9f7c981 commit 3b57819
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b57819

Please sign in to comment.