summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
authormarkus <>2003-11-11 22:15:20 +0000
committermarkus <>2003-11-11 22:15:20 +0000
commit38a053f575d6faf05903707a8e835dc231c7eca9 (patch)
tree6f8ff7f2313c890e1f52fd53451e7af46dad58b2 /src/lib/libssl/ssl_sess.c
parent76b1d16ba9a90ba98e7cfdc332eb843f02c06a1c (diff)
downloadopenbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.gz
openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.bz2
openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.zip
merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table [make includes before you build libssl/libcrypto]
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r--src/lib/libssl/ssl_sess.c4
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