projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43e9f4c
)
Fix possible race condition.
author
Dr. Stephen Henson
<steve@openssl.org>
Fri, 11 Nov 2005 12:59:39 +0000
(12:59 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Fri, 11 Nov 2005 12:59:39 +0000
(12:59 +0000)
crypto/bn/bn_mont.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_mont.c
b/crypto/bn/bn_mont.c
index 82af91f90d7f5ca0660c7761a4caafa20a39b640..42376dae6bdf627d2f5c02f5cb1eeee60e1476db 100644
(file)
--- a/
crypto/bn/bn_mont.c
+++ b/
crypto/bn/bn_mont.c
@@
-358,12
+358,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;