Fix a mem leak in ZNC core

CUser::DelChan() didn't actually delete anything, so if you joined much... well


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@856 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-10-28 18:11:44 +00:00
parent ee350ab744
commit 434231f530
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -509,6 +509,7 @@ bool CUser::AddChan(const CString& sName, bool bInConfig) {
bool CUser::DelChan(const CString& sName) {
for (vector<CChan*>::iterator a = m_vChans.begin(); a != m_vChans.end(); a++) {
if (sName.CaseCmp((*a)->GetName()) == 0) {
delete *a;
m_vChans.erase(a);
return true;
}