irc: fix memory leak when updating modes of channel
This commit is contained in:
parent
9a024f3aba
commit
45d5034ea0
@ -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"
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user