summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_prime.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-10 08:59:46 +0000
committerRichard Levitte <levitte@openssl.org>2003-01-10 08:59:46 +0000
commitf8ea5cb5799647d0becdb9f16a0e9c13875c6c3f (patch)
tree7f51e97363ffe4b45cc49ac3b630bf943b73c5f8 /crypto/bn/bn_prime.c
parent360e506710623f80eab877fb44259ede6816fb39 (diff)
Make sure everything that may be freed is allocated or initiated.
PR: 446
Diffstat (limited to 'crypto/bn/bn_prime.c')
-rw-r--r--crypto/bn/bn_prime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c
index 43eb9e6dfd..6c16029957 100644
--- a/crypto/bn/bn_prime.c
+++ b/crypto/bn/bn_prime.c
@@ -163,9 +163,9 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
BN_CTX *ctx;
int checks = BN_prime_checks_for_size(bits);
+ BN_init(&t);
ctx=BN_CTX_new();
if (ctx == NULL) goto err;
- BN_init(&t);
loop:
/* make a random number and set the top and bottom bits */
if (add == NULL)