curl: Fix memory leak in subjectAltName parsing
The parsed data from X509_get_ext_d2i() needs to be freed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
6014890bfb
commit
e60913b600
1 changed files with 3 additions and 1 deletions
|
@ -857,8 +857,10 @@ static void parse_cert(struct http_ctx *ctx, struct http_cert *hcert,
|
|||
os_memset(hcert, 0, sizeof(*hcert));
|
||||
|
||||
*names = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
|
||||
if (*names)
|
||||
if (*names) {
|
||||
add_alt_names(ctx, hcert, *names);
|
||||
sk_GENERAL_NAME_pop_free(*names, GENERAL_NAME_free);
|
||||
}
|
||||
|
||||
add_logotype_ext(ctx, hcert, cert);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue