mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
rand: don't leak memory
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13640)
This commit is contained in:
parent
8389eeea2c
commit
a678506e2f
@ -111,7 +111,7 @@ static int seed_src_generate(void *vseed, unsigned char *out, size_t outlen,
|
||||
entropy_available = ossl_pool_acquire_entropy(pool);
|
||||
|
||||
if (entropy_available > 0)
|
||||
memcpy(out, rand_pool_detach(pool), rand_pool_length(pool));
|
||||
memcpy(out, rand_pool_buffer(pool), rand_pool_length(pool));
|
||||
|
||||
rand_pool_free(pool);
|
||||
return entropy_available > 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user