From c442171f7692d3610a7aa5a08593cabf7253c5af Mon Sep 17 00:00:00 2001 From: tedu <> Date: Fri, 30 May 2014 02:52:11 +0000 Subject: no need for null check before free. from Brendan MacDonell --- src/lib/libcrypto/evp/evp_enc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/libcrypto/evp') diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index 0c3e8fcc39..afe34f6f3f 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c @@ -548,8 +548,7 @@ EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) if (c->cipher_data) OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); } - if (c->cipher_data) - free(c->cipher_data); + free(c->cipher_data); #ifndef OPENSSL_NO_ENGINE if (c->engine) /* The EVP_CIPHER we used belongs to an ENGINE, release the -- cgit v1.2.3-55-g6feb