diff options
author | tb <> | 2021-01-22 15:56:17 +0000 |
---|---|---|
committer | tb <> | 2021-01-22 15:56:17 +0000 |
commit | d5626382a55396240f1722a5e5fae881c70598d2 (patch) | |
tree | 659046d744bcc8ce7300485b1c43ca6c50ae5bfa /src/regress/lib/libssl/client/clienttest.c | |
parent | c03d37dd49716682d1a37b81c9af857acf4895cb (diff) | |
download | openbsd-d5626382a55396240f1722a5e5fae881c70598d2.tar.gz openbsd-d5626382a55396240f1722a5e5fae881c70598d2.tar.bz2 openbsd-d5626382a55396240f1722a5e5fae881c70598d2.zip |
Avoid NULL deref on BIO_new{_mem_buf,}() failure.
Diffstat (limited to 'src/regress/lib/libssl/client/clienttest.c')
-rw-r--r-- | src/regress/lib/libssl/client/clienttest.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index be9ebc1d30..51b23986fd 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.26 2020/11/19 09:35:50 tb Exp $ */ | 1 | /* $OpenBSD: clienttest.c,v 1.27 2021/01/22 15:54:32 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -456,8 +456,10 @@ client_hello_test(int testno, struct client_hello_test *cht) | |||
456 | SSL_CTX_free(ssl_ctx); | 456 | SSL_CTX_free(ssl_ctx); |
457 | SSL_free(ssl); | 457 | SSL_free(ssl); |
458 | 458 | ||
459 | rbio->references = 1; | 459 | if (rbio != NULL) |
460 | wbio->references = 1; | 460 | rbio->references = 1; |
461 | if (wbio != NULL) | ||
462 | wbio->references = 1; | ||
461 | 463 | ||
462 | BIO_free(rbio); | 464 | BIO_free(rbio); |
463 | BIO_free(wbio); | 465 | BIO_free(wbio); |