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

irc: fix memory leak when updating modes of channel

This commit is contained in:
Sebastien Helleu
2012-12-25 16:58:18 +01:00
parent 9a024f3aba
commit 45d5034ea0
2 changed files with 6 additions and 4 deletions
+1
View File
@@ -62,6 +62,7 @@ Version 0.4.0 (under dev!)
aspell.check.suggestions (task #12061)
* aspell: fix creation of spellers when number of dictionaries is different
between two buffers
* irc: fix memory leak when updating modes of channel
* irc: add tags "irc_nick1_xxx" and "irc_nick2_yyy" in message displayed for
command "NICK"
* irc: return git version in CTCP VERSION and FINGER by default, add "$git"
+5 -4
View File
@@ -241,7 +241,7 @@ irc_mode_channel_update (struct t_irc_server *server,
snprintf (str_temp, length, "%s %s", new_modes, new_args);
if (channel->modes)
free (channel->modes);
channel->modes = strdup (str_temp);
channel->modes = str_temp;
}
}
else
@@ -250,11 +250,12 @@ irc_mode_channel_update (struct t_irc_server *server,
free (channel->modes);
channel->modes = strdup (new_modes);
}
free (new_modes);
free (new_args);
}
if (new_modes)
free (new_modes);
if (new_args)
free (new_args);
if (str_modes)
free (str_modes);
if (argv)