talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 9758436014f630cd98d77128249a88fc9743e037
parent 3e0a4c09523ad7476661b7c44a2e0d4bc53a4049
Author: wwp <subscript@free.fr>
Date:   Mon, 27 Sep 2021 20:34:23 +0200

Fix CIS 1491270: resource leak.

Diffstat:
Msrc/gtk/spell_entry.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gtk/spell_entry.c b/src/gtk/spell_entry.c @@ -252,8 +252,11 @@ static gboolean word_misspelled(ClawsSpellEntry *entry, int start, int end) gboolean ret; word = get_word(entry, start, end); - if (word == NULL || g_unichar_isdigit(word[0])) + if (word == NULL || g_unichar_isdigit(word[0])) { + if (word) + g_free(word); return FALSE; + } ret = gtkaspell_misspelled_test(entry->gtkaspell, word);