From 4b45c6e52b208deff7da333d1c7f84bcd3986609 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 30 Apr 2015 17:57:32 -0400 Subject: 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 --- crypto/evp/bio_enc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto/evp/bio_enc.c') diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 4409a91242..0afd8cc502 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -137,8 +137,7 @@ static int enc_free(BIO *a) return (0); b = (BIO_ENC_CTX *)a->ptr; EVP_CIPHER_CTX_cleanup(&(b->cipher)); - OPENSSL_cleanse(a->ptr, sizeof(BIO_ENC_CTX)); - OPENSSL_free(a->ptr); + OPENSSL_clear_free(a->ptr, sizeof(BIO_ENC_CTX)); a->ptr = NULL; a->init = 0; a->flags = 0; -- cgit v1.2.3