提交 9ea72d37 编写于 作者: G Geoff Thorpe

These should be write-locks, not read-locks.

上级 a9077513
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册