Skip to content

mod.openchanfix: per-client op sets are not released on module detach #91

Description

@MrIron-no

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions