aboutsummaryrefslogtreecommitdiff
path: root/test/bntest.c
diff options
context:
space:
mode:
authorRussell Webb <russell.webb@intel.com>2015-06-13 10:35:55 -0400
committerRich Salz <rsalz@openssl.org>2015-06-23 07:59:15 -0400
commit2d540402aac7a05af9c99b58864d53c0201a0b42 (patch)
tree0099f9017d00969fa9a09a4c8a0d7aa990e42ec9 /test/bntest.c
parenta1c506ae9ecb493bb1ae3226100b489e56c4d307 (diff)
downloadopenssl-2d540402aac7a05af9c99b58864d53c0201a0b42.zip
openssl-2d540402aac7a05af9c99b58864d53c0201a0b42.tar.gz
openssl-2d540402aac7a05af9c99b58864d53c0201a0b42.tar.bz2
RT3856: Fix memory leaks in test code
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'test/bntest.c')
-rw-r--r--test/bntest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/bntest.c b/test/bntest.c
index 1ce6db1..cf4d2ab 100644
--- a/test/bntest.c
+++ b/test/bntest.c
@@ -1043,7 +1043,6 @@ int test_mod_exp_mont_consttime(BIO *bp, BN_CTX *ctx)
int test_mod_exp_mont5(BIO *bp, BN_CTX *ctx)
{
BIGNUM *a, *p, *m, *d, *e;
-
BN_MONT_CTX *mont;
a = BN_new();
@@ -1051,7 +1050,6 @@ int test_mod_exp_mont5(BIO *bp, BN_CTX *ctx)
m = BN_new();
d = BN_new();
e = BN_new();
-
mont = BN_MONT_CTX_new();
BN_bntest_rand(m, 1024, 0, 1); /* must be odd for montgomery */
@@ -1100,6 +1098,7 @@ int test_mod_exp_mont5(BIO *bp, BN_CTX *ctx)
fprintf(stderr, "Modular exponentiation test failed!\n");
return 0;
}
+ BN_MONT_CTX_free(mont);
BN_free(a);
BN_free(p);
BN_free(m);