1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

irc: remove check of NULL pointers before calling weechat_list_free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 19:31:34 +02:00
parent ac7cc25763
commit a59fa70a94
2 changed files with 5 additions and 4 deletions
+2 -4
View File
@@ -1544,10 +1544,8 @@ irc_channel_free (struct t_irc_server *server, struct t_irc_channel *channel)
free (channel->away_message);
free (channel->pv_remote_nick_color);
weechat_unhook (channel->hook_autorejoin);
if (channel->nicks_speaking[0])
weechat_list_free (channel->nicks_speaking[0]);
if (channel->nicks_speaking[1])
weechat_list_free (channel->nicks_speaking[1]);
weechat_list_free (channel->nicks_speaking[0]);
weechat_list_free (channel->nicks_speaking[1]);
irc_channel_nick_speaking_time_free_all (channel);
weechat_hashtable_free (channel->join_smart_filtered);
free (channel->buffer_as_string);
+3
View File
@@ -142,6 +142,9 @@ TEST(CoreList, Add)
/* free list */
weelist_free (list);
/* test free of NULL list */
weelist_free (NULL);
}
/*