mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
fix uaf in chanquery module
the chanquery needs to be removed in any case if a channel rec is destroyed, regardless of any state Fixes GL#13
This commit is contained in:
parent
016fd34436
commit
49ace3251b
1 changed files with 3 additions and 3 deletions
|
|
@ -125,15 +125,15 @@ static void query_remove_all(IRC_CHANNEL_REC *channel)
|
||||||
rec->queries[n] = g_slist_remove(rec->queries[n], channel);
|
rec->queries[n] = g_slist_remove(rec->queries[n], channel);
|
||||||
rec->current_queries = g_slist_remove(rec->current_queries, channel);
|
rec->current_queries = g_slist_remove(rec->current_queries, channel);
|
||||||
|
|
||||||
query_check(channel->server);
|
if (!channel->server->disconnected)
|
||||||
|
query_check(channel->server);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
|
static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
|
||||||
{
|
{
|
||||||
g_return_if_fail(channel != NULL);
|
g_return_if_fail(channel != NULL);
|
||||||
|
|
||||||
if (IS_IRC_CHANNEL(channel) && !channel->server->disconnected &&
|
if (IS_IRC_CHANNEL(channel))
|
||||||
!channel->synced)
|
|
||||||
query_remove_all(channel);
|
query_remove_all(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue