0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4732: duplicate code to free fuzzy matches

Problem:    Duplicate code to free fuzzy matches.
Solution:   Bring back fuzmatch_str_free().
This commit is contained in:
Bram Moolenaar
2022-04-10 18:09:06 +01:00
parent db0ea7f2b0
commit c6e0a5e98c
4 changed files with 21 additions and 11 deletions

View File

@@ -2877,13 +2877,7 @@ ExpandGeneric(
ga_clear_strings(&ga);
return FAIL;
}
for (i = 0; i < ga.ga_len; ++i)
{
fuzmatch = &((fuzmatch_str_T *)ga.ga_data)[i];
vim_free(fuzmatch->str);
}
ga_clear(&ga);
fuzmatch_str_free(ga.ga_data, ga.ga_len);
return FAIL;
}