mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 05:42:35 +00:00
bignum_mod: Updated mbedtls_mpi_mod_modulus_setup/free with new fields
At the current state, those fields are initialised to 0, NULL. Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
cd860dfe02
commit
760f5d6b6b
@ -77,8 +77,8 @@ void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m )
|
|||||||
switch( m->int_rep )
|
switch( m->int_rep )
|
||||||
{
|
{
|
||||||
case MBEDTLS_MPI_MOD_REP_MONTGOMERY:
|
case MBEDTLS_MPI_MOD_REP_MONTGOMERY:
|
||||||
mbedtls_free( m->rep.mont );
|
m->rep.mont.rr = NULL;
|
||||||
break;
|
m->rep.mont.mm = 0; break;
|
||||||
case MBEDTLS_MPI_MOD_REP_OPT_RED:
|
case MBEDTLS_MPI_MOD_REP_OPT_RED:
|
||||||
mbedtls_free( m->rep.ored );
|
mbedtls_free( m->rep.ored );
|
||||||
break;
|
break;
|
||||||
@ -120,8 +120,8 @@ int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m,
|
|||||||
{
|
{
|
||||||
case MBEDTLS_MPI_MOD_REP_MONTGOMERY:
|
case MBEDTLS_MPI_MOD_REP_MONTGOMERY:
|
||||||
m->int_rep = int_rep;
|
m->int_rep = int_rep;
|
||||||
m->rep.mont = NULL;
|
m->rep.mont.rr = NULL;
|
||||||
break;
|
m->rep.mont.mm = 0; break;
|
||||||
case MBEDTLS_MPI_MOD_REP_OPT_RED:
|
case MBEDTLS_MPI_MOD_REP_OPT_RED:
|
||||||
m->int_rep = int_rep;
|
m->int_rep = int_rep;
|
||||||
m->rep.ored = NULL;
|
m->rep.ored = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user