Fix a memory leak in 1.1.0 related to initial_ctx
authorNeel Goyal <ngoyal@fb.com>
Thu, 15 Jun 2017 14:51:57 +0000 (07:51 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Jun 2017 15:05:41 +0000 (08:05 -0700)
commit4ecd9abf7441f0fe7a1c78cf170ce8ba7fb5d54d
treecfaba15b3f18562a928b5a5793ed4025d94b8840
parent3bade5dfef9f8fc19a3e58f109598b6a0c7261f5
Fix a memory leak in 1.1.0 related to initial_ctx

Summary: We would always up_ref the ctx before setting it as the initial_ctx.  This causes a leak in 1.1.0 since the initial_ctx isn't set in this version of OpenSSL.  We'll move the up_ref for the initial_ctx into the OpenSSLUtils helper.

Reviewed By: anirudhvr

Differential Revision: D5227823

fbshipit-source-id: b4490b317bd4dc8752a8d7e244fd153100a52aa6
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/ssl/OpenSSLUtils.cpp