summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_gen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index 6bc86dd57e..1256a8e2a2 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -176,14 +176,14 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
if (seed_in != NULL)
memcpy(seed, seed_in, seed_len);
+ if ((mont = BN_MONT_CTX_new()) == NULL)
+ goto err;
+
if ((ctx = BN_CTX_new()) == NULL)
goto err;
BN_CTX_start(ctx);
- if ((mont = BN_MONT_CTX_new()) == NULL)
- goto err;
-
r0 = BN_CTX_get(ctx);
g = BN_CTX_get(ctx);
W = BN_CTX_get(ctx);