From: Weili Qian <qianweili@huawei.com> To avoid accessing resources after algorithm resources have been released, first stop the poll thread and release asynchronous resources, and finally destroy the algorithm resources. Signed-off-by: Weili Qian <qianweili@huawei.com> --- src/uadk_prov_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uadk_prov_init.c b/src/uadk_prov_init.c index 406a0e3..92ecc68 100644 --- a/src/uadk_prov_init.c +++ b/src/uadk_prov_init.c @@ -779,6 +779,7 @@ static void uadk_teardown(void *provctx) OPENSSL_free(ctx); } + async_module_uninit(); uadk_prov_destroy_digest(); uadk_prov_destroy_hmac(); uadk_prov_destroy_cipher(); @@ -786,7 +787,6 @@ static void uadk_teardown(void *provctx) uadk_prov_destroy_rsa(); uadk_prov_ecc_uninit(); uadk_prov_dh_uninit(); - async_module_uninit(); if (default_prov) { OSSL_PROVIDER_unload(default_prov); default_prov = NULL; -- 2.43.0