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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user