commit | 75a2860f26eab918b700f868fe8cd6ebb5714cb3 | [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> | Mon Mar 31 12:08:17 2014 +0200 |
tree | f2cba63d7439f48353b5d2974e4d90a128eea25d | |
parent | dd75c3183b60a208f4770bbd3d32a981272aa1ea [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 6d49caa..012e9e3 100644 --- a/library/bignum.c +++ b/library/bignum.c
@@ -1715,7 +1715,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 );