mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01: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…
Reference in a new issue