mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:07:23 +03:00
wolfSSL/CyaSSL: Fix memory leak in Curl_cyassl_random
RNG structure must be freed by call to FreeRng after its use in Curl_cyassl_random. This call fixes Valgrind failures when running the test suite with wolfSSL. Closes #2784
This commit is contained in:
parent
a7091ba75d
commit
10d8f3f134
1 changed files with 2 additions and 0 deletions
|
|
@ -968,6 +968,8 @@ static CURLcode Curl_cyassl_random(struct Curl_easy *data,
|
|||
return CURLE_FAILED_INIT;
|
||||
if(RNG_GenerateBlock(&rng, entropy, (unsigned)length))
|
||||
return CURLE_FAILED_INIT;
|
||||
if(FreeRng(&rng))
|
||||
return CURLE_FAILED_INIT;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue