vim-patch:9.2.0106: memory leak in expand_findfunc()

Problem:  memory leak in expand_findfunc() (after v9.1.0811)
Solution: Free list variable l on early return (Huihui Huang).

closes: vim/vim#19564

648240fe9a

N/A patches:
vim-patch:9.2.0105: memory leak in heredoc_get() in src/evalvars.c

Co-authored-by: Huihui Huang <625173@qq.com>
This commit is contained in:
zeertzjq
2026-03-04 09:11:00 +08:00
parent 0676503ab5
commit a22c699ecb

View File

@@ -5463,6 +5463,7 @@ int expand_findfunc(char *pat, char ***files, int *numMatches)
int len = tv_list_len(l);
if (len == 0) { // empty List
tv_list_free(l);
return FAIL;
}