diff options
Diffstat (limited to 'lib/libssl/ssl_rsa.c')
-rw-r--r-- | lib/libssl/ssl_rsa.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/libssl/ssl_rsa.c b/lib/libssl/ssl_rsa.c index 23891bf11b2..02dfa63a09d 100644 --- a/lib/libssl/ssl_rsa.c +++ b/lib/libssl/ssl_rsa.c @@ -118,8 +118,7 @@ SSL_use_certificate_file(SSL *ssl, const char *file, int type) end: if (x != NULL) X509_free(x); - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -243,8 +242,7 @@ SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type) ret = SSL_use_RSAPrivateKey(ssl, rsa); RSA_free(rsa); end: - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -318,8 +316,7 @@ SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) ret = SSL_use_PrivateKey(ssl, pkey); EVP_PKEY_free(pkey); end: - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -447,8 +444,7 @@ SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type) end: if (x != NULL) X509_free(x); - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -531,8 +527,7 @@ SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa); RSA_free(rsa); end: - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -603,8 +598,7 @@ SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) ret = SSL_CTX_use_PrivateKey(ctx, pkey); EVP_PKEY_free(pkey); end: - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -703,7 +697,6 @@ SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) end: if (x != NULL) X509_free(x); - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } |