diff options
author | Russell Webb <russell.webb@intel.com> | 2015-06-13 10:35:55 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-06-23 07:59:15 -0400 |
commit | 2d540402aac7a05af9c99b58864d53c0201a0b42 (patch) | |
tree | 0099f9017d00969fa9a09a4c8a0d7aa990e42ec9 /test/bntest.c | |
parent | a1c506ae9ecb493bb1ae3226100b489e56c4d307 (diff) |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/bntest.c b/test/bntest.c index 1ce6db18f3..cf4d2ab3a6 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); |