diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 19:09:11 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-26 08:53:22 +0200 |
commit | 3057d846d97a4b4bcab4c94b52d83b19bb9abcab (patch) | |
tree | 0aea1670a35b93dd3830cfc9ad4ced7faa2de603 /src/core/core-command.c | |
parent | 9a5a1fb300d30630f62cb4707ee6be6937f3467e (diff) | |
download | weechat-3057d846d97a4b4bcab4c94b52d83b19bb9abcab.zip |
core: remove check of NULL pointers before calling string_free_split() (issue #865)
Diffstat (limited to 'src/core/core-command.c')
-rw-r--r-- | src/core/core-command.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/core-command.c b/src/core/core-command.c index 552040a2d..a4c1b1525 100644 --- a/src/core/core-command.c +++ b/src/core/core-command.c @@ -3789,8 +3789,7 @@ COMMAND_CALLBACK(item) sargv = string_split_shell (argv_eol[2], &sargc); if (!sargv || (sargc < 3)) { - if (sargv) - string_free_split (sargv); + string_free_split (sargv); COMMAND_ERROR; } @@ -5147,8 +5146,7 @@ COMMAND_CALLBACK(plugin) full_name = dir_search_full_lib_name (argv[2], "plugins"); plugin_load (full_name, 1, plugin_argc, plugin_argv); free (full_name); - if (plugin_argv) - string_free_split (plugin_argv); + string_free_split (plugin_argv); return WEECHAT_RC_OK; } @@ -5173,8 +5171,7 @@ COMMAND_CALLBACK(plugin) { plugin_reload_name (argv[2], plugin_argc, plugin_argv); } - if (plugin_argv) - string_free_split (plugin_argv); + string_free_split (plugin_argv); } else plugin_reload_name (argv[2], 0, NULL); |