]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
Removing custom data upon user kills/quits would be nice to prevent memleaks
authorbuzlip01 <redacted>
Mon, 18 Dec 2006 01:56:11 +0000 (01:56 +0000)
committerbuzlip01 <redacted>
Mon, 18 Dec 2006 01:56:11 +0000 (01:56 +0000)
chanfix.cc

index 1a6689d4efc62e0d8a78d132109cd0196dba82c4..29c58271eff084f4421d424cb06f353c5925a27b 100644 (file)
@@ -1042,6 +1042,9 @@ switch(whichEvent)
                  if (ptr->second.empty())
                    authMap.erase(theClient->getAccount());
                }
+               //Cleanup
+               theClient->removeCustomData(this);
+               delete myOps;
                break;
                }
        case EVT_NICK:
@@ -1702,7 +1705,6 @@ if (myOps && !myOps->empty()) {
 
 myOps->insert(clientOpsType::value_type(thisChan->getName()));
 thisClient->setCustomData(this, static_cast< void*>(myOps));
-
 return;
 }