diff --git a/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp b/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp index 15dc194e10..e856b729fd 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp @@ -111,6 +111,12 @@ POP3Protocol::Disconnect() SSL_shutdown(fSSL); if (fSSLContext) SSL_CTX_free(fSSLContext); + if (fSSLBio) + BIO_free(fSSLBio); + + fSSL = NULL; + fSSLContext = NULL; + fSSLBio = NULL; } #endif @@ -119,6 +125,7 @@ POP3Protocol::Disconnect() #else closesocket(fSocket); #endif + fSocket = -1; return B_OK; }