mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-25 22:56:35 +08: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 );
|
return( PSA_SUCCESS );
|
||||||
}
|
}
|
||||||
|
|
||||||
operation->alg = 0;
|
|
||||||
operation->state = 0;
|
|
||||||
operation->sequence = 0;
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE)
|
#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE)
|
||||||
if( operation->alg == PSA_ALG_JPAKE )
|
if( operation->alg == PSA_ALG_JPAKE )
|
||||||
{
|
{
|
||||||
@ -721,6 +717,10 @@ psa_status_t psa_pake_abort(psa_pake_operation_t * operation)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
operation->alg = 0;
|
||||||
|
operation->state = 0;
|
||||||
|
operation->sequence = 0;
|
||||||
|
|
||||||
return( PSA_SUCCESS );
|
return( PSA_SUCCESS );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user