summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_x931g.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-30 21:37:06 -0400
committerRich Salz <rsalz@openssl.org>2015-04-30 21:37:06 -0400
commit23a1d5e97cd543d2b8e1b01dbf0f619b2e5ce540 (patch)
tree2d9372864fc2b34939d21b3706768ec225c9548f /crypto/rsa/rsa_x931g.c
parent34166d41892643a36ad2d1f53cc0025e2edc2a39 (diff)
free NULL cleanup 7
This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/rsa/rsa_x931g.c')
-rw-r--r--crypto/rsa/rsa_x931g.c13
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;