chanfix::OnDetach() (mod.openchanfix/chanfix.cc:438) releases the module's own structures — config, timer, commands, sqlManager — but never releases the per-client data it attached.
The module stores a clientOpsType* on each client that holds op, via theClient->setCustomData(this, ...) (chanfix.cc:1637). Nothing in OnDetach() walks the currently connected clients to call removeCustomData() and free those sets, so unloading the module while clients are connected leaks one set per client currently holding op.
The clean-up that does exist happens per client, on quit or kill (chanfix.cc:855-861), which covers the normal case but not module unload.
Worth noting for anyone reading ~iClient() as a backstop: it deletes the custom-data map itself, but not the values modules stored in it, so a module must release its own data.
chanfix::OnDetach()(mod.openchanfix/chanfix.cc:438) releases the module's own structures — config, timer, commands, sqlManager — but never releases the per-client data it attached.The module stores a
clientOpsType*on each client that holds op, viatheClient->setCustomData(this, ...)(chanfix.cc:1637). Nothing inOnDetach()walks the currently connected clients to callremoveCustomData()and free those sets, so unloading the module while clients are connected leaks one set per client currently holding op.The clean-up that does exist happens per client, on quit or kill (
chanfix.cc:855-861), which covers the normal case but not module unload.Worth noting for anyone reading
~iClient()as a backstop: it deletes the custom-data map itself, but not the values modules stored in it, so a module must release its own data.