diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-24 23:52:45 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 20:59:25 +0200 |
commit | 1f104d06a09b93ef18485bda53ff6e83ea99be1b (patch) | |
tree | 37939edda22075689e828c1810b112695e969ded /src/plugins/spell/spell-speller.c | |
parent | 3973258628da738c24d036c74601f18d74c61dc6 (diff) | |
download | weechat-1f104d06a09b93ef18485bda53ff6e83ea99be1b.zip |
spell: remove check of NULL pointers before calling free() (issue #865)
Diffstat (limited to 'src/plugins/spell/spell-speller.c')
-rw-r--r-- | src/plugins/spell/spell-speller.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/spell/spell-speller.c b/src/plugins/spell/spell-speller.c index 007a4c570..5ae383126 100644 --- a/src/plugins/spell/spell-speller.c +++ b/src/plugins/spell/spell-speller.c @@ -446,12 +446,9 @@ spell_speller_buffer_free_value_cb (struct t_hashtable *hashtable, ptr_speller_buffer = (struct t_spell_speller_buffer *)value; - if (ptr_speller_buffer->spellers) - free (ptr_speller_buffer->spellers); - if (ptr_speller_buffer->modifier_string) - free (ptr_speller_buffer->modifier_string); - if (ptr_speller_buffer->modifier_result) - free (ptr_speller_buffer->modifier_result); + free (ptr_speller_buffer->spellers); + free (ptr_speller_buffer->modifier_string); + free (ptr_speller_buffer->modifier_result); free (ptr_speller_buffer); } |