mirror of
https://github.com/znc/znc.git
synced 2026-07-03 08:21:57 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user