mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-25 15:59:36 +03:00
about: Rework freeing the san_names structure
AmiSSL's approach to replacing 90% of OpenSSL calls with assembly means that the official way to pop_free a stack type won't work. As such, we open-code it here. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
3ab21dbaa4
commit
20d46406ed
@ -972,7 +972,17 @@ static nserror san_to_info(X509 *cert, struct ns_cert_san **prev_next)
|
||||
}
|
||||
}
|
||||
}
|
||||
sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
|
||||
|
||||
/* AmiSSL can't cope with the "correct" mechanism of freeing
|
||||
* the GENERAL_NAME stack, which is:
|
||||
* sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
|
||||
* So instead we do this open-coded loop which does the same:
|
||||
*/
|
||||
for (idx = 0; idx < san_names_nb; idx++) {
|
||||
GENERAL_NAME *entry = sk_GENERAL_NAME_pop(san_names);
|
||||
GENERAL_NAME_free(entry);
|
||||
}
|
||||
sk_GENERAL_NAME_free(san_names);
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user