diff --git a/src/util/spell_checker.cpp b/src/util/spell_checker.cpp index 0291184c..d9aad82a 100644 --- a/src/util/spell_checker.cpp +++ b/src/util/spell_checker.cpp @@ -128,6 +128,7 @@ void SpellChecker::suggest(const String& word, vector& suggestions_out) // copy sugestions for (int i = 0 ; i < num_suggestions ; ++i) { suggestions_out.push_back(String(suggestions[i],encoding)); + free(suggestions[i]); } free(suggestions); }