From fa9c14e45d468ee5b1042cd1b44a65ed1b6d273f Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 20 Nov 2021 16:32:55 +0000 Subject: Use BIO_up_ref() instead of adjusting refcounts manually --- src/regress/lib/libssl/client/clienttest.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/regress/lib/libssl/client/clienttest.c') diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index 22654e7ed1..754fe3ae6e 100644 --- a/src/regress/lib/libssl/client/clienttest.c +++ b/src/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 * @@ -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); -- cgit v1.2.3-55-g6feb