diff --git a/src/wp_wolfprov.c b/src/wp_wolfprov.c index 675ab62f..34cf1a56 100644 --- a/src/wp_wolfprov.c +++ b/src/wp_wolfprov.c @@ -291,6 +291,10 @@ static void wolfssl_prov_ctx_free(WOLFPROV_CTX* ctx) wc_FreeMutex(&ctx->rng_mutex); #endif wc_FreeRng(&ctx->rng); +#ifdef FP_ECC + /* Free this thread's FP ECC cache; wc_ecc_free() doesn't. */ + wc_ecc_fp_free(); +#endif OPENSSL_free(ctx); }