commit | 6995efe8be2a20723ee391494e7d2910b667834d | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Mon Mar 31 12:08:17 2014 +0200 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Tue Jul 08 14:32:35 2014 +0200 |
tree | 9a8de6ea3c1a4f93a4319021a5c072586215d50d | |
parent | 3cbaf1e379900e97c21f5c640496f5971087ed70 [diff] [blame] |
Potential memory leak in mpi_exp_mod() when error occurs during calculation of RR.
diff --git a/library/bignum.c b/library/bignum.c index 3ec6ad0..0e969d5 100644 --- a/library/bignum.c +++ b/library/bignum.c
@@ -1599,7 +1599,7 @@ mpi_free( &W[1] ); mpi_free( &T ); mpi_free( &Apos ); - if( _RR == NULL ) + if( _RR == NULL || _RR->p == NULL ) mpi_free( &RR ); return( ret );