1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-03 11:23:13 +02:00

Free invite moddata properly

This commit is contained in:
k4be
2021-07-15 15:52:04 +02:00
parent cd64a34634
commit db8ff94e7a
+9 -3
View File
@@ -97,10 +97,16 @@ MOD_UNLOAD()
void invite_free(ModData *md)
{
Link *invites = md->ptr;
if(!invites)
Link **inv, *tmp;
if(!md->ptr)
return; // was not set
free_link(invites);
for (inv = (Link **)md->ptr; (tmp = *inv); inv = &tmp->next)
{
*inv = tmp->next;
free_link(tmp);
}
}
static int invite_channel_destroy(Channel *channel, int *should_destroy)