]> jfr.im git - irc/atheme/atheme.git/commitdiff
modules/chanserv/akick: fix unload crash with akicks that have timeouts
authorAaron Jones <redacted>
Sun, 29 Nov 2020 03:15:51 +0000 (03:15 +0000)
committerAaron Jones <redacted>
Sun, 29 Nov 2020 03:21:18 +0000 (03:21 +0000)
The module did not take care to cancel any outstanding expiry timers on
deinit, leading the event loop to (eventually) call a function that no
longer exists.

Backport of commit f28269362bb59ef6673d from master.

Reported-By: Ed Kellet <redacted>
modules/chanserv/akick.c

index f91e5b5b5cbd1c1063dc482220d3406b11407824..d4f8839150c43478464cad133376a8d86241f462 100644 (file)
@@ -76,6 +76,9 @@ void _modinit(module_t *m)
 
 void _moddeinit(module_unload_intent_t intent)
 {
+       if (akick_timeout_check_timer)
+               mowgli_timer_destroy(base_eventloop, akick_timeout_check_timer);
+
        service_named_unbind_command("chanserv", &cs_akick);
 
        /* Delete sub-commands */