hx509: Avoid double-free on CSR parse error

This commit is contained in:
Nicolas Williams
2019-12-20 15:50:22 -06:00
parent 5c7a8f63c7
commit 73a9c95b7b

View File

@@ -723,6 +723,7 @@ hx509_request_parse_der(hx509_context context,
if (ret) {
hx509_set_error_string(context, 0, ret, "Failed to decode CSR");
free(*req);
*req = NULL;
return ret;
}
rinfo = &r.certificationRequestInfo;