Commit e877c2ae authored by Mingtao Yang's avatar Mingtao Yang Committed by Facebook GitHub Bot

AsyncSSLSocketTest: Fix an LSAN error

Summary:
SSLAcceptRunnerFiberCloseSessionCb was leaking the SSL_SESSION because it set a
custom server SSL session callback handler that did not properly manage the
SSL_SESSION that it was given.

Reviewed By: modiking

Differential Revision: D33807657

fbshipit-source-id: 5eeaecfef5df1f1d281abe2918f9926a969ab84d
parent 6cc80fd5
......@@ -2562,7 +2562,10 @@ TEST(AsyncSSLSocketTest, SSLAcceptRunnerFiber) {
static int newCloseCb(SSL* ssl, SSL_SESSION*) {
AsyncSSLSocket::getFromSSL(ssl)->closeNow();
return 1;
// We do not want ownership over the supplied SSL_SESSION*, we return 0 to
// tell OpenSSL to free it on our behalf.
return 0;
}
#if FOLLY_OPENSSL_IS_110
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment