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 fbc30b94e6..fabcdefa6e 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -79,11 +79,11 @@ SSL_SESSION *SSL_get1_session(SSL *ssl) | |||
| 79 | /* Need to lock this all up rather than just use CRYPTO_add so that | 79 | /* Need to lock this all up rather than just use CRYPTO_add so that |
| 80 | * somebody doesn't free ssl->session between when we check it's | 80 | * somebody doesn't free ssl->session between when we check it's |
| 81 | * non-null and when we up the reference count. */ | 81 | * non-null and when we up the reference count. */ |
| 82 | CRYPTO_r_lock(CRYPTO_LOCK_SSL_SESSION); | 82 | CRYPTO_w_lock(CRYPTO_LOCK_SSL_SESSION); |
| 83 | sess = ssl->session; | 83 | sess = ssl->session; |
| 84 | if(sess) | 84 | if(sess) |
| 85 | sess->references++; | 85 | sess->references++; |
| 86 | CRYPTO_r_unlock(CRYPTO_LOCK_SSL_SESSION); | 86 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_SESSION); |
| 87 | return(sess); | 87 | return(sess); |
| 88 | } | 88 | } |
| 89 | 89 | ||
