From 784ba625ec9367473e8d8de280d8c90f94cf2d7b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 22 Sep 2019 08:24:05 +0200 Subject: [PATCH] Fix crash shortly after THROTTLE RESET. Bug was introduced yesterday with commit b4636f183c0b30478fda53368af2c58c0a3a931e --- src/modules/connthrottle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/connthrottle.c b/src/modules/connthrottle.c index 0bb95930a..ab7d8a9ff 100644 --- a/src/modules/connthrottle.c +++ b/src/modules/connthrottle.c @@ -81,7 +81,6 @@ void ucounter_free(ModData *m); MOD_TEST() { memset(&cfg, 0, sizeof(cfg)); - memset(&ucounter, 0, sizeof(ucounter)); /* Defaults: */ cfg.local.count = 20; cfg.local.period = 60; @@ -597,7 +596,7 @@ CMD_FUNC(ct_throttle) } else if (!strcasecmp(parv[1], "RESET")) { - memset(&ucounter, 0, sizeof(ucounter)); + memset(ucounter, 0, sizeof(UCounter)); sendto_realops("[connthrottle] %s (%s@%s) did a RESET on the stats/counters!!", sptr->name, sptr->user->username, sptr->user->realhost); } else