From 5b122e3a383c8e7603f1fc2322a6fe5298078a65 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 7 Nov 2019 03:58:29 +0100 Subject: libinterimap: Free reference to $self in _start_ssl(). (We don't need the function anymore once the handshake is established). Otherwise the reference count of that IMAP client never gets to 0 before the global destruction phase. For interimap, this causes traffic stats to be printed not by the cleanup() function as intended, but just before the program exits. --- lib/Net/IMAP/InterIMAP.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm index dd4134d..9c95109 100644 --- a/lib/Net/IMAP/InterIMAP.pm +++ b/lib/Net/IMAP/InterIMAP.pm @@ -1690,6 +1690,7 @@ sub _start_ssl($$) { } @$self{qw/_SSL _SSL_CTX/} = ($ssl, $ctx); + undef $self; # the verify callback has reference to $self, free it now } -- cgit v1.2.3