mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
vim-patch:9.2.0055: memory leak in ExpandFromContext() (#38066)
Problem: memory leak in ExpandFromContext()
Solution: Free the variable (Huihui Huang).
fixes: vim/vim#19500
closes: vim/vim#19505
9c3279ddc3
N/A patches:
vim-patch:9.2.0056: memory leak in ex_substitute
vim-patch:9.2.0057: memory leak in exe_newdict()
vim-patch:9.2.0058: Compile error in did_set_previewpopup()
vim-patch:9.2.0059: memory leak in fill_assert_error
Co-authored-by: Huihui Huang <625173@qq.com>
This commit is contained in:
@@ -3084,9 +3084,9 @@ static int ExpandFromContext(expand_T *xp, char *pat, char ***matches, int *numM
|
||||
if (!fuzzy) {
|
||||
regmatch.regprog = vim_regcomp(pat, magic_isset() ? RE_MAGIC : 0);
|
||||
if (regmatch.regprog == NULL) {
|
||||
xfree(tofree);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
// set ignore-case according to p_ic, p_scs and pat
|
||||
regmatch.rm_ic = ignorecase(pat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user