diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index a505e388fb..7016c87d3b 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -78,11 +78,11 @@ SSL_SESSION *SSL_get1_session(SSL *ssl) | |||
| 78 | /* Need to lock this all up rather than just use CRYPTO_add so that | 78 | /* Need to lock this all up rather than just use CRYPTO_add so that | 
| 79 | * somebody doesn't free ssl->session between when we check it's | 79 | * somebody doesn't free ssl->session between when we check it's | 
| 80 | * non-null and when we up the reference count. */ | 80 | * non-null and when we up the reference count. */ | 
| 81 | CRYPTO_r_lock(CRYPTO_LOCK_SSL_SESSION); | 81 | CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION); | 
| 82 | sess = ssl->session; | 82 | sess = ssl->session; | 
| 83 | if(sess) | 83 | if(sess) | 
| 84 | sess->references++; | 84 | sess->references++; | 
| 85 | CRYPTO_r_unlock(CRYPTO_LOCK_SSL_SESSION); | 85 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION); | 
| 86 | return(sess); | 86 | return(sess); | 
| 87 | } | 87 | } | 
| 88 | 88 | ||
