diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 19:38:40 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-26 21:18:24 +0200 |
commit | 1a31512503aa28e6b0213f6131c14a20bad8ea40 (patch) | |
tree | fa1a4c14464cd36ea936365f7628258ccf4234d1 /src/gui | |
parent | a7b21fa64734c847d5ab628a2f6e2e609b8eb298 (diff) | |
download | weechat-1a31512503aa28e6b0213f6131c14a20bad8ea40.zip |
core: remove check of NULL pointers before calling string_free_split_tags() (issue #865)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-buffer.c | 6 | ||||
-rw-r--r-- | src/gui/gui-filter.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index cb36e02ff..439de44db 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -3740,11 +3740,9 @@ gui_buffer_close (struct t_gui_buffer *buffer) free (buffer->highlight_regex_compiled); } free (buffer->highlight_tags_restrict); - if (buffer->highlight_tags_restrict_array) - string_free_split_tags (buffer->highlight_tags_restrict_array); + string_free_split_tags (buffer->highlight_tags_restrict_array); free (buffer->highlight_tags); - if (buffer->highlight_tags_array) - string_free_split_tags (buffer->highlight_tags_array); + string_free_split_tags (buffer->highlight_tags_array); free (buffer->input_callback_data); free (buffer->close_callback_data); free (buffer->nickcmp_callback_data); diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index c7caadc8d..81e61a7b0 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -542,8 +542,7 @@ gui_filter_free (struct t_gui_filter *filter) free (filter->buffer_name); string_free_split (filter->buffers); free (filter->tags); - if (filter->tags_array) - string_free_split_tags (filter->tags_array); + string_free_split_tags (filter->tags_array); free (filter->regex); if (filter->regex_prefix) { |