From a0dcf9bffd61e6ee9a9cbd88c4614e937f759583 Mon Sep 17 00:00:00 2001 From: Michael Richardson Date: Fri, 26 May 2023 17:54:00 -0400 Subject: [PATCH] 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. --- lib/hx509/req.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hx509/req.c b/lib/hx509/req.c index e7e94551b..d8605416b 100644 --- a/lib/hx509/req.c +++ b/lib/hx509/req.c @@ -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,