diff options
Diffstat (limited to 'crypto/rsa/rsa_x931g.c')
-rw-r--r-- | crypto/rsa/rsa_x931g.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c index 5991615784..e158c6d443 100644 --- a/crypto/rsa/rsa_x931g.c +++ b/crypto/rsa/rsa_x931g.c @@ -179,12 +179,10 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, ret = 1; err: - if (ctx) { + if (ctx) BN_CTX_end(ctx); - BN_CTX_free(ctx); - } - if (ctx2) - BN_CTX_free(ctx2); + BN_CTX_free(ctx); + BN_CTX_free(ctx2); return ret; @@ -234,10 +232,9 @@ int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, ok = 1; error: - if (ctx) { + if (ctx) BN_CTX_end(ctx); - BN_CTX_free(ctx); - } + BN_CTX_free(ctx); if (ok) return 1; |