Fixed new issue with ecc_projective_add_point not free'ing the local x, y, z if fast math was disabled. Formatting cleanup in integer.c.

This commit is contained in:
David Garske
2016-05-11 08:47:30 -07:00
parent 3bff6f10e3
commit 440956f8d4
2 changed files with 6 additions and 3 deletions

View File

@@ -527,6 +527,10 @@ int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R,
err = mp_copy(y, R->y);
if (err == MP_OKAY)
err = mp_copy(z, R->z);
mp_clear(x);
mp_clear(y);
mp_clear(z);
#endif
#ifndef USE_FAST_MATH

View File

@@ -279,8 +279,7 @@ int mp_init_copy (mp_int * a, mp_int * b)
/* copy, b = a */
int
mp_copy (mp_int * a, mp_int * b)
int mp_copy (mp_int * a, mp_int * b)
{
int res, n;