summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_prime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_prime.c')
-rw-r--r--src/lib/libcrypto/bn/bn_prime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_prime.c b/src/lib/libcrypto/bn/bn_prime.c
index 918b9237c6..e072d9255c 100644
--- a/src/lib/libcrypto/bn/bn_prime.c
+++ b/src/lib/libcrypto/bn/bn_prime.c
@@ -140,6 +140,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
140 BN_CTX *ctx; 140 BN_CTX *ctx;
141 int checks = BN_prime_checks_for_size(bits); 141 int checks = BN_prime_checks_for_size(bits);
142 142
143 BN_init(&t);
143 ctx=BN_CTX_new(); 144 ctx=BN_CTX_new();
144 if (ctx == NULL) goto err; 145 if (ctx == NULL) goto err;
145 if (ret == NULL) 146 if (ret == NULL)
@@ -148,7 +149,6 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
148 } 149 }
149 else 150 else
150 rnd=ret; 151 rnd=ret;
151 BN_init(&t);
152loop: 152loop:
153 /* make a random number and set the top and bottom bits */ 153 /* make a random number and set the top and bottom bits */
154 if (add == NULL) 154 if (add == NULL)