mbedtls: free the entropy when threaded

The entropy_free was never done for threaded builds, causing a small
(fixed) memory leak.

Reported-by: RevaliQaQ on github
Fixes #12584
Closes #12585
This commit is contained in:
Daniel Stenberg 2023-12-22 10:16:14 +01:00
parent 35380273b9
commit 8b1d229835
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1206,6 +1206,9 @@ static int mbedtls_init(void)
static void mbedtls_cleanup(void)
{
#ifdef THREADING_SUPPORT
mbedtls_entropy_free(&ts_entropy);
#endif /* THREADING_SUPPORT */
(void)Curl_mbedtlsthreadlock_thread_cleanup();
}