Remove useless NULL checks

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
FdaSilvaYY 2016-05-07 18:54:01 +02:00 committed by Matt Caswell
parent 7d52e55457
commit aca6dae94b
3 changed files with 3 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}