diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-07 11:37:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-07 11:37:36 (GMT) |
commit | 1e29c4f4ad0ec8903b99967d45b6ea0ea76c6111 (patch) | |
tree | 2312b71d74326ff86bcbd4acecb0f10a1c0ad63c /libtommath/bn_mp_mod.c | |
parent | 1cb1fee6edc063cb49beb0188c2a3db4771846fa (diff) | |
download | tcl-1e29c4f4ad0ec8903b99967d45b6ea0ea76c6111.zip tcl-1e29c4f4ad0ec8903b99967d45b6ea0ea76c6111.tar.gz tcl-1e29c4f4ad0ec8903b99967d45b6ea0ea76c6111.tar.bz2 |
Update to latest "develop" branch
Diffstat (limited to 'libtommath/bn_mp_mod.c')
-rw-r--r-- | libtommath/bn_mp_mod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtommath/bn_mp_mod.c b/libtommath/bn_mp_mod.c index 18b4e6b..8fbfe08 100644 --- a/libtommath/bn_mp_mod.c +++ b/libtommath/bn_mp_mod.c @@ -14,8 +14,7 @@ mp_err mp_mod(const mp_int *a, const mp_int *b, mp_int *c) } if ((err = mp_div(a, b, NULL, &t)) != MP_OKAY) { - mp_clear(&t); - return err; + goto LBL_ERR; } if (MP_IS_ZERO(&t) || (t.sign == b->sign)) { @@ -25,6 +24,7 @@ mp_err mp_mod(const mp_int *a, const mp_int *b, mp_int *c) err = mp_add(b, &t, c); } +LBL_ERR: mp_clear(&t); return err; } |