diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-09-08 16:01:38 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-09-08 16:01:38 +0000 |
commit | 19ed670b51cc7fd895cfa42899b3b8c1f914c5d2 (patch) | |
tree | a9e47eda910d9565d4464ec4f0db06490d7da812 | |
parent | 3158c87a02a191d4056f7b802dcc9aed5b918522 (diff) | |
download | openssl-19ed670b51cc7fd895cfa42899b3b8c1f914c5d2.tar.gz |
These should be write-locks, not read-locks.
-rw-r--r-- | ssl/ssl_sess.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index a8668e42e6..681a7d77cd 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -81,11 +81,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); } |