mirror of
https://github.com/curl/curl.git
synced 2026-07-08 03:57:18 +03:00
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:
parent
35380273b9
commit
8b1d229835
1 changed files with 3 additions and 0 deletions
|
|
@ -1206,6 +1206,9 @@ static int mbedtls_init(void)
|
||||||
|
|
||||||
static void mbedtls_cleanup(void)
|
static void mbedtls_cleanup(void)
|
||||||
{
|
{
|
||||||
|
#ifdef THREADING_SUPPORT
|
||||||
|
mbedtls_entropy_free(&ts_entropy);
|
||||||
|
#endif /* THREADING_SUPPORT */
|
||||||
(void)Curl_mbedtlsthreadlock_thread_cleanup();
|
(void)Curl_mbedtlsthreadlock_thread_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue