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/plugins/plugin-api-info.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/plugins/plugin-api-info.c')
-rw-r--r-- | src/plugins/plugin-api-info.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index bc887aa9e..4c1606264 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -858,8 +858,7 @@ plugin_api_info_nick_color_cb (const void *pointer, void *data, -1, (num_items >= 2) ? items[1] : NULL); - if (items) - string_free_split (items); + string_free_split (items); return result; } @@ -888,8 +887,7 @@ plugin_api_info_nick_color_name_cb (const void *pointer, void *data, -1, (num_items >= 2) ? items[1] : NULL); - if (items) - string_free_split (items); + string_free_split (items); return result; } @@ -928,8 +926,7 @@ plugin_api_info_nick_color_ignore_case_cb (const void *pointer, void *data, case_range, (num_items >= 3) ? items[2] : NULL); - if (items) - string_free_split (items); + string_free_split (items); return result; } @@ -968,8 +965,7 @@ plugin_api_info_nick_color_name_ignore_case_cb (const void *pointer, void *data, case_range, (num_items >= 3) ? items[2] : NULL); - if (items) - string_free_split (items); + string_free_split (items); return result; } @@ -1119,8 +1115,7 @@ plugin_api_info_totp_generate_cb (const void *pointer, void *data, return totp; error: - if (argv) - string_free_split (argv); + string_free_split (argv); free (totp); return NULL; } @@ -1191,8 +1186,7 @@ plugin_api_info_totp_validate_cb (const void *pointer, void *data, return strdup (value); error: - if (argv) - string_free_split (argv); + string_free_split (argv); return NULL; } |