From: Angus Gratton Date: Wed, 6 Sep 2017 05:07:17 +0000 (+1000) Subject: mbedtls: Re-apply ECP memory leak fix X-Git-Tag: v3.1-dev~305^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=314299783053c210db59206e99770f7e915633ed;p=esp-idf mbedtls: Re-apply ECP memory leak fix Fix not yet submitted upstream. (Previously applied in ffefeef5ea271735884d656afac7a4155a57c87f) --- diff --git a/components/mbedtls/library/ecp.c b/components/mbedtls/library/ecp.c index 5ad6863987..a9705388cb 100644 --- a/components/mbedtls/library/ecp.c +++ b/components/mbedtls/library/ecp.c @@ -1448,7 +1448,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] );