forked from wolfSSL/wolfssl
Free ECC cache per thread when used
This commit is contained in:
12
tests/api.c
12
tests/api.c
@ -35189,6 +35189,10 @@ static void test_wolfSSL_BIO_connect(void)
|
|||||||
join_thread(serverThread);
|
join_thread(serverThread);
|
||||||
FreeTcpReady(&ready);
|
FreeTcpReady(&ready);
|
||||||
|
|
||||||
|
#if defined(HAVE_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS)
|
||||||
|
wc_ecc_fp_free(); /* free per thread cache */
|
||||||
|
#endif
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -35215,6 +35219,10 @@ static THREAD_RETURN WOLFSSL_THREAD test_wolfSSL_BIO_accept_client(void* args)
|
|||||||
SSL_free(sslClient);
|
SSL_free(sslClient);
|
||||||
SSL_CTX_free(ctx);
|
SSL_CTX_free(ctx);
|
||||||
|
|
||||||
|
#if defined(HAVE_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS)
|
||||||
|
wc_ecc_fp_free(); /* free per thread cache */
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -35259,8 +35267,8 @@ static void test_wolfSSL_BIO_accept(void)
|
|||||||
SSL_free(sslServer);
|
SSL_free(sslServer);
|
||||||
SSL_CTX_free(ctx);
|
SSL_CTX_free(ctx);
|
||||||
|
|
||||||
#ifdef FP_ECC
|
#if defined(HAVE_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS)
|
||||||
wc_ecc_fp_free();
|
wc_ecc_fp_free(); /* free per thread cache */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
|
Reference in New Issue
Block a user