diff options
Diffstat (limited to 'crypto/bn/bn_recp.c')
-rw-r--r-- | crypto/bn/bn_recp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 6826f93..7497ac6 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -152,8 +152,10 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, if (BN_ucmp(m, &(recp->N)) < 0) { BN_zero(d); - if (!BN_copy(r, m)) + if (!BN_copy(r, m)) { + BN_CTX_end(ctx); return 0; + } BN_CTX_end(ctx); return (1); } |