diff options
author | Pascal Cuoq <cuoq@trust-in-soft.com> | 2015-05-05 11:20:39 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2015-10-07 20:36:54 +0200 |
commit | cc1cdc5df5e80883de20d6f59ecfc4505bbb3e52 (patch) | |
tree | 1c357aa0eacf8fe37c47909e85da509dc134f269 /crypto | |
parent | 738b8e6bc2331ae9230411d88b8a100614f80457 (diff) |
Move BN_CTX_start() call so the error case can always call BN_CTX_end().
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
(cherry picked from commit 99c203337574d967c86ffbfa13f40ace51048485)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dsa/dsa_gen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 9d3b59e047..6bc86dd57e 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -179,10 +179,11 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, if ((ctx = BN_CTX_new()) == NULL) goto err; + BN_CTX_start(ctx); + if ((mont = BN_MONT_CTX_new()) == NULL) goto err; - BN_CTX_start(ctx); r0 = BN_CTX_get(ctx); g = BN_CTX_get(ctx); W = BN_CTX_get(ctx); |