mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04: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
@ -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…
Reference in New Issue
Block a user