From 813bc55a8496875cef52e6da42d608e4d2fa35da Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 24 May 2008 12:05:08 +0000 Subject: Fix memory leak if we send STARTTLS twice, thanks special and psychon git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9800 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ssl_gnutls.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 74aede15d..2e954632e 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -390,6 +390,10 @@ class ModuleSSLGnuTLS : public Module issl_session* session = &sessions[fd]; + /* For STARTTLS: Don't try and init a session on a socket that already has a session */ + if (session->sess) + return; + session->fd = fd; session->inbuf = new char[inbufsize]; session->inbufoffset = 0; -- cgit v1.2.3