Skip to content

Commit 3b57819

Browse files
committed
crypto: fix leak in SafeX509ExtPrint
`ASN1_item_d2i`'s return value must be freed by the owner. Fix: #1075 PR-URL: #1087 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 9f7c981 commit 3b57819

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_crypto.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ static bool SafeX509ExtPrint(BIO* out, X509_EXTENSION* ext) {
11321132
X509V3_EXT_val_prn(out, nval, 0, 0);
11331133
}
11341134
}
1135+
sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free);
11351136

11361137
return true;
11371138
}

0 commit comments

Comments
 (0)