1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 02:03:13 +02:00

plugins: remove check of NULL pointers before calling weechat_string_free_split() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 19:07:02 +02:00
parent f11c7c1bf4
commit 9a5a1fb300
32 changed files with 65 additions and 135 deletions
+1 -3
View File
@@ -591,9 +591,7 @@ fset_command_run_set_cb (const void *pointer, void *data,
}
end:
if (argv)
weechat_string_free_split (argv);
weechat_string_free_split (argv);
return rc;
}
+1 -2
View File
@@ -96,8 +96,7 @@ fset_completion_option_cb (const void *pointer, void *data,
completion, words[i], 0, WEECHAT_LIST_POS_SORT);
}
}
if (words)
weechat_string_free_split (words);
weechat_string_free_split (words);
ptr_option = weechat_hdata_move (fset_hdata_config_option,
ptr_option, 1);
}
+2 -6
View File
@@ -142,9 +142,7 @@ fset_config_change_auto_refresh_cb (const void *pointer, void *data,
(void) data;
(void) option;
if (fset_config_auto_refresh)
weechat_string_free_split (fset_config_auto_refresh);
weechat_string_free_split (fset_config_auto_refresh);
fset_config_auto_refresh = weechat_string_split (
weechat_config_string (fset_config_look_auto_refresh),
",",
@@ -206,9 +204,7 @@ fset_config_change_sort_cb (const void *pointer, void *data,
(void) data;
(void) option;
if (fset_config_sort_fields)
weechat_string_free_split (fset_config_sort_fields);
weechat_string_free_split (fset_config_sort_fields);
fset_config_sort_fields = weechat_string_split (
weechat_config_string (fset_config_look_sort),
",",