Clear variables after free them. Don't leak fSSLBio. Should help a bit for #7365. Note: the IMAP ServerConnection should be reused for POP3 and SMTP.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40955 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-03-14 21:20:42 +00:00
parent 6e499760b3
commit 21b9693bd2

View File

@ -111,6 +111,12 @@ POP3Protocol::Disconnect()
SSL_shutdown(fSSL); SSL_shutdown(fSSL);
if (fSSLContext) if (fSSLContext)
SSL_CTX_free(fSSLContext); SSL_CTX_free(fSSLContext);
if (fSSLBio)
BIO_free(fSSLBio);
fSSL = NULL;
fSSLContext = NULL;
fSSLBio = NULL;
} }
#endif #endif
@ -119,6 +125,7 @@ POP3Protocol::Disconnect()
#else #else
closesocket(fSocket); closesocket(fSocket);
#endif #endif
fSocket = -1;
return B_OK; return B_OK;
} }