
From: Chenghai Huang <huangchenghai2@huawei.com> After BIO_meth_new, it need to call BIO_meth_free to free the memery. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- src/uadk_prov_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uadk_prov_init.c b/src/uadk_prov_init.c index a6012ab..f3f360f 100644 --- a/src/uadk_prov_init.c +++ b/src/uadk_prov_init.c @@ -260,13 +260,17 @@ static void uadk_teardown(void *provctx) { struct uadk_prov_ctx *ctx = (struct uadk_prov_ctx *)provctx; + if (ctx) { + BIO_meth_free(ctx->corebiometh); + OPENSSL_free(ctx); + } + uadk_prov_destroy_digest(); uadk_prov_destroy_cipher(); uadk_prov_destroy_aead(); uadk_prov_destroy_rsa(); uadk_prov_ecc_uninit(); uadk_prov_dh_uninit(); - OPENSSL_free(ctx); OSSL_PROVIDER_unload(prov); async_module_uninit(); } -- 2.33.0