mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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 #10071)
This commit is contained in:
committed by
Bram Moolenaar
parent
1061195057
commit
2b74b6805b
@@ -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
|
||||
|
Reference in New Issue
Block a user