diff options
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/s3_lib.c | 3 | ||||
-rw-r--r-- | lib/libssl/ssl_cert.c | 6 | ||||
-rw-r--r-- | lib/libssl/ssl_rsa.c | 21 |
3 files changed, 10 insertions, 20 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index 5ed0aee7d56..6165b2a1207 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -2337,8 +2337,7 @@ ssl3_free(SSL *s) if (s->s3->tmp.ca_names != NULL) sk_X509_NAME_pop_free(s->s3->tmp.ca_names, X509_NAME_free); - if (s->s3->handshake_buffer) - BIO_free(s->s3->handshake_buffer); + BIO_free(s->s3->handshake_buffer); if (s->s3->handshake_dgst) ssl3_free_digest_list(s); OPENSSL_cleanse(s->s3, sizeof *s->s3); diff --git a/lib/libssl/ssl_cert.c b/lib/libssl/ssl_cert.c index 44efb64deac..ce8a6b54e09 100644 --- a/lib/libssl/ssl_cert.c +++ b/lib/libssl/ssl_cert.c @@ -628,8 +628,7 @@ err: } if (sk != NULL) sk_X509_NAME_free(sk); - if (in != NULL) - BIO_free(in); + BIO_free(in); if (x != NULL) X509_free(x); if (ret != NULL) @@ -688,8 +687,7 @@ SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, err: ret = 0; } - if (in != NULL) - BIO_free(in); + BIO_free(in); if (x != NULL) X509_free(x); 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); } |