Merge branch 'cherry-pick-5d736f7eca' into 'release/v2.1'
mbedtls: Fix memory leak in initial ECDH exchange if OOM/failure occurs See merge request !995
This commit is contained in:
commit
fc67a8b1b9
1 changed files with 1 additions and 1 deletions
|
@ -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] );
|
||||
|
|
Loading…
Reference in a new issue