summaryrefslogtreecommitdiffstats
path: root/test/bntest.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 /test/bntest.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 'test/bntest.c')
-rw-r--r--test/bntest.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/test/bntest.c b/test/bntest.c
index 521858ae16..7aaefc58e5 100644
--- a/test/bntest.c
+++ b/test/bntest.c
@@ -761,14 +761,10 @@ int test_sqr(BIO *bp, BN_CTX *ctx)
}
ret = 1;
err:
- if (a != NULL)
- BN_free(a);
- if (c != NULL)
- BN_free(c);
- if (d != NULL)
- BN_free(d);
- if (e != NULL)
- BN_free(e);
+ BN_free(a);
+ BN_free(c);
+ BN_free(d);
+ BN_free(e);
return ret;
}
@@ -1669,14 +1665,10 @@ int test_kron(BIO *bp, BN_CTX *ctx)
fflush(stderr);
ret = 1;
err:
- if (a != NULL)
- BN_free(a);
- if (b != NULL)
- BN_free(b);
- if (r != NULL)
- BN_free(r);
- if (t != NULL)
- BN_free(t);
+ BN_free(a);
+ BN_free(b);
+ BN_free(r);
+ BN_free(t);
return ret;
}
@@ -1764,12 +1756,9 @@ int test_sqrt(BIO *bp, BN_CTX *ctx)
}
ret = 1;
err:
- if (a != NULL)
- BN_free(a);
- if (p != NULL)
- BN_free(p);
- if (r != NULL)
- BN_free(r);
+ BN_free(a);
+ BN_free(p);
+ BN_free(r);
return ret;
}