diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libssl/ciphers/cipherstest.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/regress/lib/libssl/ciphers/cipherstest.c b/src/regress/lib/libssl/ciphers/cipherstest.c index 34ac96e48c..94e1a8c73b 100644 --- a/src/regress/lib/libssl/ciphers/cipherstest.c +++ b/src/regress/lib/libssl/ciphers/cipherstest.c | |||
| @@ -398,7 +398,7 @@ cipher_set_test() | |||
| 398 | SSL_CIPHER *cipher; | 398 | SSL_CIPHER *cipher; |
| 399 | SSL_CTX *ctx = NULL; | 399 | SSL_CTX *ctx = NULL; |
| 400 | SSL *ssl = NULL; | 400 | SSL *ssl = NULL; |
| 401 | int failed = 1; | 401 | int failed = 0; |
| 402 | size_t i; | 402 | size_t i; |
| 403 | int j; | 403 | int j; |
| 404 | 404 | ||
| @@ -448,26 +448,18 @@ cipher_set_test() | |||
| 448 | fprintf(stderr, "FAIL: test %zu - got cipher %d with " | 448 | fprintf(stderr, "FAIL: test %zu - got cipher %d with " |
| 449 | "id %lx, want %lx\n", i, j, | 449 | "id %lx, want %lx\n", i, j, |
| 450 | SSL_CIPHER_get_id(cipher), cst->cids[j]); | 450 | SSL_CIPHER_get_id(cipher), cst->cids[j]); |
| 451 | goto failed; | 451 | failed |= 1; |
| 452 | } | 452 | } |
| 453 | if (cst->cids[j] != 0) { | 453 | if (cst->cids[j] != 0) { |
| 454 | fprintf(stderr, "FAIL: test %zu - got %d ciphers, " | 454 | fprintf(stderr, "FAIL: test %zu - got %d ciphers, " |
| 455 | "expected more", i, sk_SSL_CIPHER_num(ciphers)); | 455 | "expected more", i, sk_SSL_CIPHER_num(ciphers)); |
| 456 | goto failed; | 456 | failed |= 1; |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | SSL_CTX_free(ctx); | 459 | SSL_CTX_free(ctx); |
| 460 | ctx = NULL; | ||
| 461 | SSL_free(ssl); | 460 | SSL_free(ssl); |
| 462 | ssl = NULL; | ||
| 463 | } | 461 | } |
| 464 | 462 | ||
| 465 | failed = 0; | ||
| 466 | |||
| 467 | failed: | ||
| 468 | SSL_CTX_free(ctx); | ||
| 469 | SSL_free(ssl); | ||
| 470 | |||
| 471 | return failed; | 463 | return failed; |
| 472 | } | 464 | } |
| 473 | 465 | ||
