mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 08:14:27 +01:00
Remove unnecessary calls to init() from free()
Our API makes no guarantee that you can use a context after free()ing it without re-init()ing it first, so better not give the wrong impression that we do, while it's not policy and the rest of the code might not allow it.
This commit is contained in:
parent
c37423fa76
commit
d8b73f2312
@ -161,8 +161,6 @@ void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx )
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
mbedtls_ecp_restart_free( &ctx->rs );
|
||||
#endif
|
||||
|
||||
mbedtls_ecdh_init( ctx );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
|
@ -126,8 +126,6 @@ static void ecdsa_restart_sig_free( mbedtls_ecdsa_restart_sig_ctx *ctx )
|
||||
|
||||
mbedtls_mpi_free( &ctx->k );
|
||||
mbedtls_mpi_free( &ctx->r );
|
||||
|
||||
ecdsa_restart_sig_init( ctx );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
|
||||
|
Loading…
Reference in New Issue
Block a user