OpenSSL: Unload providers on deinit
This frees up the allocated resources and makes memory leak detection more convenient without the known allocations being left behind. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
092efd45a6
commit
097ca6bf0b
2 changed files with 25 additions and 8 deletions
|
@ -1130,6 +1130,8 @@ void tls_deinit(void *ssl_ctx)
|
|||
|
||||
tls_openssl_ref_count--;
|
||||
if (tls_openssl_ref_count == 0) {
|
||||
void openssl_unload_legacy_provider(void);
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
|
||||
(defined(LIBRESSL_VERSION_NUMBER) && \
|
||||
LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
|
@ -1145,6 +1147,7 @@ void tls_deinit(void *ssl_ctx)
|
|||
tls_global->ocsp_stapling_response = NULL;
|
||||
os_free(tls_global);
|
||||
tls_global = NULL;
|
||||
openssl_unload_legacy_provider();
|
||||
}
|
||||
|
||||
os_free(data->check_cert_subject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue