diff options
-rw-r--r-- | src/nvim/insexpand.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index ec885b33c3..bc02545ed8 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -2820,6 +2820,8 @@ static void get_next_spell_completion(linenr_T lnum) int num_matches = expand_spelling(lnum, (char_u *)compl_pattern, &matches); if (num_matches > 0) { ins_compl_add_matches(num_matches, matches, p_ic); + } else { + xfree(matches); } } |