summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/server/servertest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libssl/server/servertest.c')
-rw-r--r--src/regress/lib/libssl/server/servertest.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/regress/lib/libssl/server/servertest.c b/src/regress/lib/libssl/server/servertest.c
index a71c5f8c66..bd0adcd005 100644
--- a/src/regress/lib/libssl/server/servertest.c
+++ b/src/regress/lib/libssl/server/servertest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: servertest.c,v 1.5 2021/01/22 15:56:17 tb Exp $ */ 1/* $OpenBSD: servertest.c,v 1.6 2021/11/20 16:36:55 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2015, 2016, 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2015, 2016, 2017 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -155,9 +155,8 @@ server_hello_test(int testno, struct server_hello_test *sht)
155 goto failure; 155 goto failure;
156 } 156 }
157 157
158 rbio->references = 2; 158 BIO_up_ref(rbio);
159 wbio->references = 2; 159 BIO_up_ref(wbio);
160
161 SSL_set_bio(ssl, rbio, wbio); 160 SSL_set_bio(ssl, rbio, wbio);
162 161
163 if (SSL_accept(ssl) != 0) { 162 if (SSL_accept(ssl) != 0) {
@@ -172,11 +171,6 @@ server_hello_test(int testno, struct server_hello_test *sht)
172 SSL_CTX_free(ssl_ctx); 171 SSL_CTX_free(ssl_ctx);
173 SSL_free(ssl); 172 SSL_free(ssl);
174 173
175 if (rbio != NULL)
176 rbio->references = 1;
177 if (wbio != NULL)
178 wbio->references = 1;
179
180 BIO_free(rbio); 174 BIO_free(rbio);
181 BIO_free(wbio); 175 BIO_free(wbio);
182 176