mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
Fix a NULL pointer dereference in route_replies
When there was only one client with a pending request and that client disconnected from ZNC, we didn't destroy the timeout. This means that the associated timer eventually fired and then tried to display which request caused the timeout. But since we already cleaned up the rest, this resulted in a NULL pointer dereference. This commit fixes also another bug: If two different clients got pending requests and the client whose request was currently handled disconnected, we didn't send the other client's request to the IRCd. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2102 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -195,16 +195,17 @@ public:
|
||||
if (m_pClient == m_pDoing) {
|
||||
// The replies which aren't received yet will be
|
||||
// broadcasted to everyone, but at least nothing breaks
|
||||
RemTimer("RouteTimeout");
|
||||
m_pDoing = NULL;
|
||||
m_pReplies = NULL;
|
||||
}
|
||||
|
||||
it = m_vsPending.find(m_pClient);
|
||||
|
||||
if (it == m_vsPending.end())
|
||||
return;
|
||||
if (it != m_vsPending.end())
|
||||
m_vsPending.erase(it);
|
||||
|
||||
m_vsPending.erase(it);
|
||||
SendRequest();
|
||||
}
|
||||
|
||||
virtual EModRet OnRaw(CString& sLine)
|
||||
|
||||
Reference in New Issue
Block a user