summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 57872b65d..8a4599565 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -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 == "")