diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-10 18:09:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-10 18:09:06 +0100 |
commit | c6e0a5e98c07d898e829d62bd938b1cc1fd37e94 (patch) | |
tree | 30d7f2ba11a0532c7cc4fecbf0383d0fd02c058e /src/cmdexpand.c | |
parent | db0ea7f2b00c84d84f188c9e9953c4f1887528e7 (diff) |
patch 8.2.4732: duplicate code to free fuzzy matchesv8.2.4732
Problem: Duplicate code to free fuzzy matches.
Solution: Bring back fuzmatch_str_free().
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r-- | src/cmdexpand.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c index ca669c0798..9bcea7e8d6 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -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; } |