summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-11-20 16:32:56 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-11-20 16:32:56 +0000
commitb95e19c7a3fb4062b372288fdb9a288636990c4d (patch)
treec63d3ee935736cef93a2ab389cab91464d2a8686 /regress/lib
parent7dddfea983936b3cc458ba6623a7a1a4e2e174fc (diff)
Use BIO_up_ref() instead of adjusting refcounts manually
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libssl/client/clienttest.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/regress/lib/libssl/client/clienttest.c b/regress/lib/libssl/client/clienttest.c
index 22654e7ed1a..754fe3ae6ed 100644
--- a/regress/lib/libssl/client/clienttest.c
+++ b/regress/lib/libssl/client/clienttest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clienttest.c,v 1.35 2021/08/30 17:34:01 tb Exp $ */
+/* $OpenBSD: clienttest.c,v 1.36 2021/11/20 16:32:55 tb Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
*
@@ -652,9 +652,8 @@ client_hello_test(int testno, const struct client_hello_test *cht)
goto failure;
}
- rbio->references = 2;
- wbio->references = 2;
-
+ BIO_up_ref(rbio);
+ BIO_up_ref(wbio);
SSL_set_bio(ssl, rbio, wbio);
if (SSL_connect(ssl) != 0) {
@@ -712,11 +711,6 @@ client_hello_test(int testno, const struct client_hello_test *cht)
SSL_CTX_free(ssl_ctx);
SSL_free(ssl);
- if (rbio != NULL)
- rbio->references = 1;
- if (wbio != NULL)
- wbio->references = 1;
-
BIO_free(rbio);
BIO_free(wbio);