mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
OPENSSL_cleanup: cleanup secure memory
If the global DRBGs are allocated on the secure heap, then calling CRYPTO_secure_malloc_done() inside main() will have no effect, unless OPENSSL_cleanup() has been called explicitely before that, because otherwise the DRBGs will still be allocated. So it is better to cleanup the secure heap automatically at the end of OPENSSL_cleanup(). Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5294)
This commit is contained in:
parent
8164d91d18
commit
d7c402c4f2
@ -502,6 +502,8 @@ void OPENSSL_cleanup(void)
|
||||
obj_cleanup_int();
|
||||
err_cleanup();
|
||||
|
||||
CRYPTO_secure_malloc_done();
|
||||
|
||||
base_inited = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user