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

api: readjust string size in function string_dyn_free when string is not freed (issue #1875)

This frees some allocated memory if size_alloc was greater than size in the
dynamic string.
This commit is contained in:
Sébastien Helleu
2023-01-28 22:18:14 +01:00
parent 48c1aebb83
commit fa6a9bb934
5 changed files with 20 additions and 17 deletions
+1 -4
View File
@@ -372,10 +372,7 @@ irc_join_build_string (struct t_arraylist *arraylist)
end:
if (channels)
{
result = *channels;
weechat_string_dyn_free (channels, 0);
}
result = weechat_string_dyn_free (channels, 0);
if (keys)
weechat_string_dyn_free (keys, 1);