From aca6dae94b5bb298b05081a876e30370d82e22b5 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Sat, 7 May 2016 18:54:01 +0200 Subject: [PATCH] Remove useless NULL checks Reviewed-by: Rich Salz Reviewed-by: Matt Caswell --- crypto/dh/dh_meth.c | 3 +-- crypto/dsa/dsa_meth.c | 3 +-- crypto/rsa/rsa_meth.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crypto/dh/dh_meth.c b/crypto/dh/dh_meth.c index afd47aba8a..45753b6164 100644 --- a/crypto/dh/dh_meth.c +++ b/crypto/dh/dh_meth.c @@ -31,8 +31,7 @@ DH_METHOD *DH_meth_new(const char *name, int flags) void DH_meth_free(DH_METHOD *dhm) { if (dhm != NULL) { - if (dhm->name != NULL) - OPENSSL_free(dhm->name); + OPENSSL_free(dhm->name); OPENSSL_free(dhm); } } diff --git a/crypto/dsa/dsa_meth.c b/crypto/dsa/dsa_meth.c index 5ce93396cf..1d27ceae1c 100644 --- a/crypto/dsa/dsa_meth.c +++ b/crypto/dsa/dsa_meth.c @@ -39,8 +39,7 @@ DSA_METHOD *DSA_meth_new(const char *name, int flags) void DSA_meth_free(DSA_METHOD *dsam) { if (dsam != NULL) { - if (dsam->name != NULL) - OPENSSL_free(dsam->name); + OPENSSL_free(dsam->name); OPENSSL_free(dsam); } } diff --git a/crypto/rsa/rsa_meth.c b/crypto/rsa/rsa_meth.c index bce5ee8ba9..ef0dc9751f 100644 --- a/crypto/rsa/rsa_meth.c +++ b/crypto/rsa/rsa_meth.c @@ -31,8 +31,7 @@ RSA_METHOD *RSA_meth_new(const char *name, int flags) void RSA_meth_free(RSA_METHOD *meth) { if (meth != NULL) { - if (meth->name != NULL) - OPENSSL_free(meth->name); + OPENSSL_free(meth->name); OPENSSL_free(meth); } }