gcrypt: Explicitly initialize RNG backend to allocate static data
The libgcrypt RNG implementation uses static buffer allocation which it does not free. There is no symbol we can catch in leak-detective, hence we explicitly initialize the RNG during the whitelisted gcrypt_plugin_create() function.
This commit is contained in:
@@ -158,6 +158,9 @@ plugin_t *gcrypt_plugin_create()
|
|||||||
}
|
}
|
||||||
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
|
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
|
||||||
|
|
||||||
|
/* initialize static allocations we want to exclude from leak-detective */
|
||||||
|
gcry_create_nonce(NULL, 0);
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
Reference in New Issue
Block a user