Hmm not as bad as I initially thought, because SSL_free is never called. Hence, we pile up SSL structs... but this seems to be a general problem in M2Crypto.SSL.Connection [1]. However, it still would be great, if you could test it again with the commented/removed session code path. TIA! [1] https://gitlab.com/m2crypto/m2crypto/merge_requests/190