commit 6bbe2fe8cd44c4a3a78496ea5c3173961c61a2cb
Author: Дилян Палаузов <git-dpa@aegee.org>
Date:   Sun Feb 25 17:14:28 2024 +0100

    Revert "tls.c: need to free SSL_SESSION when removing it from cache"
    
    This reverts commit a3523d4067c502a52cb7ee859c1493d1a980b7e0.
    
    Closes: https://github.com/cyrusimap/cyrus-imapd/issues/4785

diff --git a/imap/tls.c b/imap/tls.c
index cee70d9b9..31de7a757 100644
--- a/imap/tls.c
+++ b/imap/tls.c
@@ -637,7 +637,6 @@ static void remove_session_cb(SSL_CTX *ctx __attribute__((unused)),
     session_id = SSL_SESSION_get_id(sess, &session_id_length);
 
     remove_session(session_id, session_id_length);
-    SSL_SESSION_free(sess);
 }
 
 /*
