hx509: Avoid double-free on CSR parse error
This commit is contained in:
@@ -723,6 +723,7 @@ hx509_request_parse_der(hx509_context context,
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
hx509_set_error_string(context, 0, ret, "Failed to decode CSR");
|
hx509_set_error_string(context, 0, ret, "Failed to decode CSR");
|
||||||
free(*req);
|
free(*req);
|
||||||
|
*req = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
rinfo = &r.certificationRequestInfo;
|
rinfo = &r.certificationRequestInfo;
|
||||||
|
Reference in New Issue
Block a user