if a CSR has multiple extRequests, keep only last

The code already keeps the last entry, but it leaks the previous copies.  @nicowilliams noticed this.
This commit is contained in:
Michael Richardson
2023-05-26 17:54:00 -04:00
committed by Nico Williams
parent 76db37d833
commit a0dcf9bffd

View File

@@ -921,6 +921,7 @@ hx509_request_parse_der(hx509_context context,
continue;
av = a->value.val;
free_Extensions(&exts); /* keep last instance of extension, if multiple included */
ret = decode_Extensions(av->data, av->length, &exts, NULL);
if (ret) {
hx509_set_error_string(context, 0, ret,