From 3165f063b56e1e233875f529a8b01dbd771cce60 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 22 Nov 2022 15:00:46 +0000 Subject: [PATCH] mpi_exp_mod: use x_index consistently Signed-off-by: Janos Follath --- library/bignum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/bignum.c b/library/bignum.c index 993eb2aed9..3f81d5de3b 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -2253,7 +2253,7 @@ cleanup: for( i = w_table_used_size/2; i < w_table_used_size; i++ ) mbedtls_mpi_free( &W[i] ); - mbedtls_mpi_free( &W[0] ); + mbedtls_mpi_free( &W[x_index] ); mbedtls_mpi_free( &W[1] ); mbedtls_mpi_free( &T ); mbedtls_mpi_free( &Apos );