diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-11-11 13:00:07 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-11-11 13:00:07 +0000 |
commit | d6a03a23a8552070591784935d5aee949d5b9623 (patch) | |
tree | bf544ea3af990a39b47e4a1656c762b8de926484 /crypto | |
parent | e347b0da2b84965fcb89e64d74fc23d1816e9532 (diff) |
Update from stable branch.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bn/bn_mont.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 7a8b67ba55..c2cfecf370 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -432,12 +432,12 @@ BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, CRYPTO_w_lock(lock); if (!*pmont) { - *pmont = BN_MONT_CTX_new(); - if (*pmont && !BN_MONT_CTX_set(*pmont, mod, ctx)) - { - BN_MONT_CTX_free(*pmont); - *pmont = NULL; - } + BN_MONT_CTX *mtmp; + mtmp = BN_MONT_CTX_new(); + if (mtmp && !BN_MONT_CTX_set(mtmp, mod, ctx)) + BN_MONT_CTX_free(mtmp); + else + *pmont = mtmp; } CRYPTO_w_unlock(lock); return *pmont; |