aboutsummaryrefslogtreecommitdiff
path: root/openssl/vendor/current/crypto/err/err.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-10-09 16:29:05 +0000
committerRob Austein <sra@hactrn.net>2006-10-09 16:29:05 +0000
commit1b2aa7959c86a835491c8cfca8c0683b747c1855 (patch)
tree9a0ba58647a2d57115f5c003ca4673e7693c950a /openssl/vendor/current/crypto/err/err.c
parent084adb601f2d375395c6cdcedf8af91f1065fe4e (diff)
Merge in vendor branch OpenSSL changes 0.9.8b -> 0.9.8d
svn path=/openssl/vendor/current/CHANGES; revision=375
Diffstat (limited to 'openssl/vendor/current/crypto/err/err.c')
-rw-r--r--openssl/vendor/current/crypto/err/err.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/openssl/vendor/current/crypto/err/err.c b/openssl/vendor/current/crypto/err/err.c
index 72e3f3a2..96bd255e 100644
--- a/openssl/vendor/current/crypto/err/err.c
+++ b/openssl/vendor/current/crypto/err/err.c
@@ -548,9 +548,20 @@ static void build_SYS_str_reasons(void)
int i;
static int init = 1;
- if (!init) return;
-
+ CRYPTO_r_lock(CRYPTO_LOCK_ERR);
+ if (!init)
+ {
+ CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
+ return;
+ }
+
+ CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
CRYPTO_w_lock(CRYPTO_LOCK_ERR);
+ if (!init)
+ {
+ CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
+ return;
+ }
for (i = 1; i <= NUM_SYS_STR_REASONS; i++)
{