mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
vim-patch:8.2.4679: cannot have expandcmd() give an error message for mistakes
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 vim/vim#10071)
2b74b6805b
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -1244,7 +1244,7 @@ int gen_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, i
|
||||
add_pat = expand_backtick(&ga, (char *)p, flags);
|
||||
if (add_pat == -1) {
|
||||
recursive = false;
|
||||
FreeWild(ga.ga_len, ga.ga_data);
|
||||
ga_clear_strings(&ga);
|
||||
*num_file = 0;
|
||||
*file = NULL;
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user