Fix memory leak in ecp_mul_comb() if ecp_precompute_comb() fails
In ecp_mul_comb(), if (!p_eq_g && grp->T == NULL) and then ecp_precompute_comb() fails (which can
happen due to OOM), then the new array of points T will be leaked (as it's newly allocated, but
hasn't been asigned to grp->T yet).
Symptom was a memory leak in ECDHE key exchange under low memory conditions.
diff --git a/ChangeLog b/ChangeLog
index 17c71f7..767d36c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,8 @@
* Correct the documentation for `mbedtls_ssl_get_session()`.
This API has deep copy of the session, and the peer
certificate is not lost. Fixes #926.
+ * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails.
+ Fix contributed by Espressif Systems.
Changes
* Change the shebang line in Perl scripts to look up perl in the PATH.