Merge branch 'bugfix/mbedtls_ecp_failure_memory_leak' into 'master'

mbedtls: Fix memory leak in initial ECDH exchange if OOM/failure occurs

See merge request !987
This commit is contained in:
Angus Gratton 2017-07-13 15:39:40 +08:00
commit 1ed4eadfab

View file

@ -1406,7 +1406,7 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
cleanup:
if( T != NULL && ! p_eq_g )
if( T != NULL && T != grp->T )
{
for( i = 0; i < pre_len; i++ )
mbedtls_ecp_point_free( &T[i] );