diff options
Diffstat (limited to 'ssl/ssl_rsa.c')
-rw-r--r-- | ssl/ssl_rsa.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index b5d457a9eb..e4798e9316 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -119,8 +119,7 @@ int SSL_use_certificate_file(SSL *ssl, const char *file, int type) ret = SSL_use_certificate(ssl, x); end: - if (x != NULL) - X509_free(x); + X509_free(x); BIO_free(in); return (ret); } @@ -418,8 +417,7 @@ static int ssl_set_cert(CERT *c, X509 *x) EVP_PKEY_free(pkey); - if (c->pkeys[i].x509 != NULL) - X509_free(c->pkeys[i].x509); + X509_free(c->pkeys[i].x509); CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); c->pkeys[i].x509 = x; c->key = &(c->pkeys[i]); @@ -465,8 +463,7 @@ int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type) ret = SSL_CTX_use_certificate(ctx, x); end: - if (x != NULL) - X509_free(x); + X509_free(x); BIO_free(in); return (ret); } |