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.
diff --git a/library/ecdh.c b/library/ecdh.c
index 8336912..fb46845 100644
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -161,8 +161,6 @@
#if defined(MBEDTLS_ECP_RESTARTABLE)
mbedtls_ecp_restart_free( &ctx->rs );
#endif
-
- mbedtls_ecdh_init( ctx );
}
#if defined(MBEDTLS_ECP_RESTARTABLE)
diff --git a/library/ecdsa.c b/library/ecdsa.c
index 663433c..9e35da1 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -126,8 +126,6 @@
mbedtls_mpi_free( &ctx->k );
mbedtls_mpi_free( &ctx->r );
-
- ecdsa_restart_sig_init( ctx );
}
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)