mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Really fix #528
The previous fix (5e6e3be3) left a possibility to use-after-delete, though it has been much harder to accidentally trigger. If AddChan(pChan) fails, it deletes pChan, so the new crash was happening during showing of error message. Test for this is at master branch:9777a1a667Thanks to https://scan.coverity.com/ for pointing at this.
This commit is contained in:
@@ -707,7 +707,7 @@ public:
|
||||
}
|
||||
|
||||
if (!pNetwork->AddChan(pChan)) {
|
||||
WebSock.PrintErrorPage("Could not add channel [" + pChan->GetName() + "]");
|
||||
WebSock.PrintErrorPage("Could not add channel [" + sChanName + "]");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user