From b8d4cf77632874355baff8d21707c75608b3e1a2 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 6 May 2020 09:01:36 +0200 Subject: [PATCH] Actually call moddata_free_channel(channel); This was a FIXME item that should have been addressed earlier. We didn't use any MODDATATYPE_CHANNEL in the core up to now so this was overlooked. We do use it from now on, though, and it may very well have been used in 3rd party modules already. --- src/api-moddata.c | 1 - src/channel.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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);