1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

irc: fix memory leak on nick account in irc_channel_remove_account()

This commit is contained in:
Sébastien Helleu
2015-01-25 15:00:38 +01:00
parent d2ef6e675d
commit 0a75d79e93
+6 -2
View File
@@ -690,8 +690,11 @@ irc_channel_remove_account (struct t_irc_server *server,
if (channel->type == IRC_CHANNEL_TYPE_CHANNEL)
{
for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick)
for (ptr_nick = channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
if (ptr_nick->account)
free (ptr_nick->account);
ptr_nick->account = strdup ("*");
}
}
@@ -709,7 +712,8 @@ irc_channel_remove_away (struct t_irc_server *server,
if (channel->type == IRC_CHANNEL_TYPE_CHANNEL)
{
for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick)
for (ptr_nick = channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
irc_nick_set_away (server, channel, ptr_nick, 0);
}