diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 19:07:02 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-26 08:53:22 +0200 |
commit | 9a5a1fb300d30630f62cb4707ee6be6937f3467e (patch) | |
tree | 3eb560f6c64641ba3ae22d059ffbb020b0451daf /src/plugins/exec | |
parent | f11c7c1bf46d494a5a0df616ed0dcc11c64505e1 (diff) | |
download | weechat-9a5a1fb300d30630f62cb4707ee6be6937f3467e.zip |
plugins: remove check of NULL pointers before calling weechat_string_free_split() (issue #865)
Diffstat (limited to 'src/plugins/exec')
-rw-r--r-- | src/plugins/exec/exec-buffer.c | 6 | ||||
-rw-r--r-- | src/plugins/exec/exec-config.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/exec/exec-buffer.c b/src/plugins/exec/exec-buffer.c index 3e4cd3e66..0ac48fc27 100644 --- a/src/plugins/exec/exec-buffer.c +++ b/src/plugins/exec/exec-buffer.c @@ -68,10 +68,8 @@ exec_buffer_input_cb (const void *pointer, void *data, if (argv && argv_eol) exec_command_run (buffer, argc, argv, argv_eol, 0); - if (argv) - weechat_string_free_split (argv); - if (argv_eol) - weechat_string_free_split (argv_eol); + weechat_string_free_split (argv); + weechat_string_free_split (argv_eol); return WEECHAT_RC_OK; } diff --git a/src/plugins/exec/exec-config.c b/src/plugins/exec/exec-config.c index 01a00fd70..2357cf053 100644 --- a/src/plugins/exec/exec-config.c +++ b/src/plugins/exec/exec-config.c @@ -63,9 +63,7 @@ exec_config_change_command_default_options (const void *pointer, void *data, (void) data; (void) option; - if (exec_config_cmd_options) - weechat_string_free_split (exec_config_cmd_options); - + weechat_string_free_split (exec_config_cmd_options); exec_config_cmd_options = weechat_string_split ( weechat_config_string (exec_config_command_default_options), " ", |