diff --git a/Changes b/Changes index 64fb08701..db880ed15 100644 --- a/Changes +++ b/Changes @@ -288,3 +288,5 @@ AngryWolf. - Applied patch from slePP for bug #0001252: if IPv6 was enabled then in some cases names were not properly resolved. Original bug reported by kormat. +- Fixed bugs regarding HOOKTYPE_SERVER_QUIT: was sometimes called twice and could cause + crashes due read-after-free. Reported by SET (#0001988). diff --git a/src/s_misc.c b/src/s_misc.c index 4ca6ba19b..de467b7d2 100644 --- a/src/s_misc.c +++ b/src/s_misc.c @@ -597,11 +597,8 @@ int exit_client(aClient *cptr, aClient *sptr, aClient *from, char *comment) for (acptr = client; acptr; acptr = next) { next = acptr->next; - if (IsServer(acptr) && acptr->srvptr == sptr) { - exit_client(sptr, acptr, /* RECURSION */ - sptr, comment1); - RunHook(HOOKTYPE_SERVER_QUIT, acptr); - } + if (IsServer(acptr) && acptr->srvptr == sptr) + exit_client(sptr, acptr, sptr, comment1); /* RECURSION */ /* * I am not masking SQUITS like I do QUITs. This * is probobly something we could easily do, but