diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libssl/unit/ssl_versions.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/regress/lib/libssl/unit/ssl_versions.c b/src/regress/lib/libssl/unit/ssl_versions.c index 2ca72157ab..62ecc78245 100644 --- a/src/regress/lib/libssl/unit/ssl_versions.c +++ b/src/regress/lib/libssl/unit/ssl_versions.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_versions.c,v 1.15 2021/06/27 16:54:55 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_versions.c,v 1.16 2021/12/29 23:04:12 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -502,11 +502,13 @@ test_ssl_max_shared_version(void) | |||
| 502 | 502 | ||
| 503 | if ((ssl_ctx = SSL_CTX_new(svt->ssl_method())) == NULL) { | 503 | if ((ssl_ctx = SSL_CTX_new(svt->ssl_method())) == NULL) { |
| 504 | fprintf(stderr, "SSL_CTX_new() returned NULL\n"); | 504 | fprintf(stderr, "SSL_CTX_new() returned NULL\n"); |
| 505 | return 1; | 505 | failed++; |
| 506 | goto err; | ||
| 506 | } | 507 | } |
| 507 | if ((ssl = SSL_new(ssl_ctx)) == NULL) { | 508 | if ((ssl = SSL_new(ssl_ctx)) == NULL) { |
| 508 | fprintf(stderr, "SSL_new() returned NULL\n"); | 509 | fprintf(stderr, "SSL_new() returned NULL\n"); |
| 509 | return 1; | 510 | failed++; |
| 511 | goto err; | ||
| 510 | } | 512 | } |
| 511 | 513 | ||
| 512 | SSL_clear_options(ssl, SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | | 514 | SSL_clear_options(ssl, SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | |
| @@ -535,8 +537,14 @@ test_ssl_max_shared_version(void) | |||
| 535 | 537 | ||
| 536 | SSL_CTX_free(ssl_ctx); | 538 | SSL_CTX_free(ssl_ctx); |
| 537 | SSL_free(ssl); | 539 | SSL_free(ssl); |
| 540 | ssl_ctx = NULL; | ||
| 541 | ssl = NULL; | ||
| 538 | } | 542 | } |
| 539 | 543 | ||
| 544 | err: | ||
| 545 | SSL_CTX_free(ssl_ctx); | ||
| 546 | SSL_free(ssl); | ||
| 547 | |||
| 540 | return (failed); | 548 | return (failed); |
| 541 | } | 549 | } |
| 542 | 550 | ||
