projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid a race condition in loading config settings
[openssl.git]
/
crypto
/
lock.c
diff --git
a/crypto/lock.c
b/crypto/lock.c
index d24527a49bd6949046990a747fa848303583086b..0925214f320cdfc46c9d74b2750732b423281890 100644
(file)
--- a/
crypto/lock.c
+++ b/
crypto/lock.c
@@
-1,4
+1,3
@@
-/* crypto/cryptlib.c */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
@@
-121,8
+120,6
@@
static double OpenSSL_MSVC5_hack = 0.0; /* and for VC1.5 */
#endif
static double OpenSSL_MSVC5_hack = 0.0; /* and for VC1.5 */
#endif
-DECLARE_STACK_OF(CRYPTO_dynlock)
-
/* real #defines in crypto.h, keep these upto date */
static const char *const lock_names[CRYPTO_NUM_LOCKS] = {
"<<ERROR>>",
/* real #defines in crypto.h, keep these upto date */
static const char *const lock_names[CRYPTO_NUM_LOCKS] = {
"<<ERROR>>",
@@
-166,7
+163,8
@@
static const char *const lock_names[CRYPTO_NUM_LOCKS] = {
"comp",
"fips",
"fips2",
"comp",
"fips",
"fips2",
-#if CRYPTO_NUM_LOCKS != 41
+ "init",
+#if CRYPTO_NUM_LOCKS != 42
# error "Inconsistency between crypto.h and cryptlib.c"
#endif
};
# error "Inconsistency between crypto.h and cryptlib.c"
#endif
};
@@
-215,7
+213,7
@@
int CRYPTO_get_new_lockid(char *name)
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE);
return (0);
}
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE);
return (0);
}
- if ((str =
BUF
_strdup(name)) == NULL) {
+ if ((str =
OPENSSL
_strdup(name)) == NULL) {
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE);
return (0);
}
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID, ERR_R_MALLOC_FAILURE);
return (0);
}