summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/bn/bn_convert.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_convert.c b/src/regress/lib/libcrypto/bn/bn_convert.c
index df69b78050..c787036cc4 100644
--- a/src/regress/lib/libcrypto/bn/bn_convert.c
+++ b/src/regress/lib/libcrypto/bn/bn_convert.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_convert.c,v 1.4 2024/04/09 14:56:21 jsing Exp $ */ 1/* $OpenBSD: bn_convert.c,v 1.5 2024/04/09 16:06:01 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -482,7 +482,8 @@ test_bn_convert(void)
482 } 482 }
483 483
484 free(mpi_out); 484 free(mpi_out);
485 485 mpi_out = NULL;
486
486 if ((mpi_len = BN_bn2mpi(bn, NULL)) != bct->mpi_len) { 487 if ((mpi_len = BN_bn2mpi(bn, NULL)) != bct->mpi_len) {
487 fprintf(stderr, "FAIL: Test %zu - BN_bn2mpi() returned " 488 fprintf(stderr, "FAIL: Test %zu - BN_bn2mpi() returned "
488 "%d, want %d", i, mpi_len, bct->mpi_len); 489 "%d, want %d", i, mpi_len, bct->mpi_len);
@@ -550,6 +551,7 @@ test_bn_convert(void)
550 failed = 0; 551 failed = 0;
551 552
552 failure: 553 failure:
554 free(mpi_out);
553 free(out_str); 555 free(out_str);
554 BN_free(bn); 556 BN_free(bn);
555 557