mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
Fix psa_pake_abort() order to correctly free memory when alg is PSA_ALG_JPAKE
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
a24278a74a
commit
fbc4b4aa8e
@ -702,10 +702,6 @@ psa_status_t psa_pake_abort(psa_pake_operation_t * operation)
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
||||
operation->alg = 0;
|
||||
operation->state = 0;
|
||||
operation->sequence = 0;
|
||||
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE)
|
||||
if( operation->alg == PSA_ALG_JPAKE )
|
||||
{
|
||||
@ -721,6 +717,10 @@ psa_status_t psa_pake_abort(psa_pake_operation_t * operation)
|
||||
}
|
||||
#endif
|
||||
|
||||
operation->alg = 0;
|
||||
operation->state = 0;
|
||||
operation->sequence = 0;
|
||||
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user