summaryrefslogtreecommitdiff
path: root/regress/lib/libssl/ssl/ssltest.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/lib/libssl/ssl/ssltest.c')
-rw-r--r--regress/lib/libssl/ssl/ssltest.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/regress/lib/libssl/ssl/ssltest.c b/regress/lib/libssl/ssl/ssltest.c
index 5587c0e424e..fd8031983ef 100644
--- a/regress/lib/libssl/ssl/ssltest.c
+++ b/regress/lib/libssl/ssl/ssltest.c
@@ -813,13 +813,9 @@ bad:
SSL_free(c_ssl);
end:
- if (s_ctx != NULL)
- SSL_CTX_free(s_ctx);
- if (c_ctx != NULL)
- SSL_CTX_free(c_ctx);
-
- if (bio_stdout != NULL)
- BIO_free(bio_stdout);
+ SSL_CTX_free(s_ctx);
+ SSL_CTX_free(c_ctx);
+ BIO_free(bio_stdout);
free_tmp_rsa();
#ifndef OPENSSL_NO_ENGINE
@@ -830,8 +826,8 @@ end:
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_mem_leaks(bio_err);
- if (bio_err != NULL)
- BIO_free(bio_err);
+ BIO_free(bio_err);
+
exit(ret);
return ret;
}
@@ -1183,18 +1179,12 @@ end:
err:
ERR_print_errors(bio_err);
- if (server)
- BIO_free(server);
- if (server_io)
- BIO_free(server_io);
- if (client)
- BIO_free(client);
- if (client_io)
- BIO_free(client_io);
- if (s_ssl_bio)
- BIO_free(s_ssl_bio);
- if (c_ssl_bio)
- BIO_free(c_ssl_bio);
+ BIO_free(server);
+ BIO_free(server_io);
+ BIO_free(client);
+ BIO_free(client_io);
+ BIO_free(s_ssl_bio);
+ BIO_free(c_ssl_bio);
return ret;
}
@@ -1454,14 +1444,11 @@ err:
c_ssl->wbio = NULL;
}
- if (c_to_s != NULL)
- BIO_free(c_to_s);
- if (s_to_c != NULL)
- BIO_free(s_to_c);
- if (c_bio != NULL)
- BIO_free_all(c_bio);
- if (s_bio != NULL)
- BIO_free_all(s_bio);
+ BIO_free(c_to_s);
+ BIO_free(s_to_c);
+ BIO_free_all(c_bio);
+ BIO_free_all(s_bio);
+
return (ret);
}