]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree.cpp
Fixed encryption being set on a connection that has only just begun!
[user/henk/code/inspircd.git] / src / modules / m_spanningtree.cpp
index 57872b65d63e7a209678addd6aa35550ec357963..8a4599565e3a3993938ab77135a7032afc3c7d95 100644 (file)
@@ -552,6 +552,7 @@ class TreeSocket : public InspSocket
        {
                myhost = host;
                this->LinkState = LISTENER;
+               this->ctx = NULL;
        }
 
        TreeSocket(std::string host, int port, bool listening, unsigned long maxtime, std::string ServerName)
@@ -559,6 +560,7 @@ class TreeSocket : public InspSocket
        {
                myhost = ServerName;
                this->LinkState = CONNECTING;
+               this->ctx = NULL;
        }
 
        /* When a listening socket gives us a new file descriptor,
@@ -569,9 +571,16 @@ class TreeSocket : public InspSocket
                : InspSocket(newfd, ip)
        {
                this->LinkState = WAIT_AUTH_1;
+               this->ctx = NULL;
                this->SendCapabilities();
        }
 
+       ~TreeSocket()
+       {
+               if (ctx)
+                       delete ctx;
+       }
+
        void InitAES(std::string key,std::string SName)
        {
                if (key == "")