On Wed, Oct 13, 2021 at 11:57:14PM +0000, Jason Schultz wrote: > I'm somewhat familiar with the reference count stuff from reading the > doc on these (and other) functions. But it sounds like the behavior > I'm seeing is expected, and OpenSSL is doing the actual free of the > SSL_SESSION when the SSL_CTX is freed. That's plausibly the case, barring bugs in your application, yes either freeing some handle too many or too few times. -- Viktor.