diff --git a/src/common/sae.c b/src/common/sae.c index 674cb6502..c1b488e91 100644 --- a/src/common/sae.c +++ b/src/common/sae.c @@ -134,8 +134,10 @@ static struct crypto_bignum * sae_get_rand(struct sae_data *sae) return NULL; if (crypto_bignum_is_zero(bn) || crypto_bignum_is_one(bn) || - crypto_bignum_cmp(bn, sae->tmp->order) >= 0) + crypto_bignum_cmp(bn, sae->tmp->order) >= 0) { + crypto_bignum_deinit(bn, 0); continue; + } break; }