diff --git a/src/api-moddata.c b/src/api-moddata.c index 0ec86e569..84be03b74 100644 --- a/src/api-moddata.c +++ b/src/api-moddata.c @@ -125,7 +125,6 @@ void moddata_free_local_client(Client *client) memset(client->moddata, 0, sizeof(client->moddata)); } -// FIXME: this is never called void moddata_free_channel(Channel *channel) { ModDataInfo *md; diff --git a/src/channel.c b/src/channel.c index ddb48747f..e849c58d7 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1071,6 +1071,8 @@ int sub1_from_channel(Channel *channel) * But first we will destroy all kinds of references and lists... */ + moddata_free_channel(channel); + while ((lp = channel->invites)) del_invite(lp->value.client, channel);