summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_sess.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-09-08 16:00:46 +0000
committerGeoff Thorpe <geoff@openssl.org>2003-09-08 16:00:46 +0000
commit62afa8bd587346b688efd9f6f2667bb7e036845c (patch)
treeb73dcabe040257fa2d39f260a8b9d47fe7d7f1f3 /ssl/ssl_sess.c
parent2689b8f3268ff05c0bda180e21548bc066bbc96a (diff)
These should be write-locks, not read-locks.
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r--ssl/ssl_sess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index fbc30b94e6..fabcdefa6e 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -79,11 +79,11 @@ SSL_SESSION *SSL_get1_session(SSL *ssl)
/* Need to lock this all up rather than just use CRYPTO_add so that
* somebody doesn't free ssl->session between when we check it's
* non-null and when we up the reference count. */
- CRYPTO_r_lock(CRYPTO_LOCK_SSL_SESSION);
+ CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION);
sess = ssl->session;
if(sess)
sess->references++;
- CRYPTO_r_unlock(CRYPTO_LOCK_SSL_SESSION);
+ CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION);
return(sess);
}