free cleanup almost the finale
Add OPENSSL_clear_free which merges cleanse and free.
(Names was picked to be similar to BN_clear_free, etc.)
Removed OPENSSL_freeFunc macro.
Fixed the small simple ones that are left:
CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -207,10 +207,7 @@ static size_t drbg_get_entropy(DRBG_CTX *ctx, unsigned char **pout,
|
||||
|
||||
static void drbg_free_entropy(DRBG_CTX *ctx, unsigned char *out, size_t olen)
|
||||
{
|
||||
if (out) {
|
||||
OPENSSL_cleanse(out, olen);
|
||||
OPENSSL_free(out);
|
||||
}
|
||||
OPENSSL_clear_free(out, olen);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user