diff options
author | tb <> | 2021-11-20 16:32:55 +0000 |
---|---|---|
committer | tb <> | 2021-11-20 16:32:55 +0000 |
commit | fa9c14e45d468ee5b1042cd1b44a65ed1b6d273f (patch) | |
tree | 0b996a054939fd7327abedd5b8225d1586ca412b /src | |
parent | 2a8d48ca6010ac1986f67d288e2e4ea8eef0a502 (diff) | |
download | openbsd-fa9c14e45d468ee5b1042cd1b44a65ed1b6d273f.tar.gz openbsd-fa9c14e45d468ee5b1042cd1b44a65ed1b6d273f.tar.bz2 openbsd-fa9c14e45d468ee5b1042cd1b44a65ed1b6d273f.zip |
Use BIO_up_ref() instead of adjusting refcounts manually
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/client/clienttest.c | 12 |
1 files changed, 3 insertions, 9 deletions
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 @@ | |||
1 | /* $OpenBSD: clienttest.c,v 1.35 2021/08/30 17:34:01 tb Exp $ */ | 1 | /* $OpenBSD: clienttest.c,v 1.36 2021/11/20 16:32:55 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -652,9 +652,8 @@ client_hello_test(int testno, const struct client_hello_test *cht) | |||
652 | goto failure; | 652 | goto failure; |
653 | } | 653 | } |
654 | 654 | ||
655 | rbio->references = 2; | 655 | BIO_up_ref(rbio); |
656 | wbio->references = 2; | 656 | BIO_up_ref(wbio); |
657 | |||
658 | SSL_set_bio(ssl, rbio, wbio); | 657 | SSL_set_bio(ssl, rbio, wbio); |
659 | 658 | ||
660 | if (SSL_connect(ssl) != 0) { | 659 | if (SSL_connect(ssl) != 0) { |
@@ -712,11 +711,6 @@ client_hello_test(int testno, const struct client_hello_test *cht) | |||
712 | SSL_CTX_free(ssl_ctx); | 711 | SSL_CTX_free(ssl_ctx); |
713 | SSL_free(ssl); | 712 | SSL_free(ssl); |
714 | 713 | ||
715 | if (rbio != NULL) | ||
716 | rbio->references = 1; | ||
717 | if (wbio != NULL) | ||
718 | wbio->references = 1; | ||
719 | |||
720 | BIO_free(rbio); | 714 | BIO_free(rbio); |
721 | BIO_free(wbio); | 715 | BIO_free(wbio); |
722 | 716 | ||