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

irc: fix memory leak when joining channels with keys

This commit is contained in:
Sébastien Helleu
2023-10-07 20:33:42 +02:00
parent a33f0d2132
commit 020c8145b6
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ For a list of important changes that require manual actions, please look at rele
Bug fixes::
* core: fix generation of TOTP on Big Endian systems (issue #2021)
* irc: fix memory leak when joining channels with keys
Build::
+5
View File
@@ -2907,11 +2907,13 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
pos_keys++;
}
if (pos_keys[0])
{
keys = weechat_string_split (pos_keys, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_keys);
}
}
else
new_args = strdup (arguments);
@@ -3025,6 +3027,9 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
}
weechat_string_free_split (channels);
}
if (keys)
weechat_string_free_split (keys);
}
/*