diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-04-03 21:30:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-03 21:30:32 +0100 |
commit | 2b74b6805b5c8c4836b66df5d949f5ff6a77f8c7 (patch) | |
tree | b43c7e0c3a0f359db844e5e3434ce1f7ef522e3c /src/filepath.c | |
parent | 1061195057c4518877cb6da7591eadff9db14598 (diff) |
patch 8.2.4679: cannot have expandcmd() give an error message for mistakesv8.2.4679
Problem: Cannot have expandcmd() give an error message for mistakes.
Solution: Add an optional argument to give errors. Fix memory leak when
expanding files fails. (Yegappan Lakshmanan, closes #10071)
Diffstat (limited to 'src/filepath.c')
-rw-r--r-- | src/filepath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filepath.c b/src/filepath.c index 5bf31ea8e8..3786ef6330 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -3999,7 +3999,7 @@ gen_expand_wildcards( // When returning FAIL the array must be freed here. if (retval == FAIL) - ga_clear(&ga); + ga_clear_strings(&ga); *num_file = ga.ga_len; *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data |