neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 9288357d59d2c6bbc88c7db4eda5fc888c896a90
parent 583308f5991c4c55d3f04e456254d95433033c72
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 26 Feb 2026 08:04:34 +0800

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

https://github.com/vim/vim/commit/9c3279ddc39da31f3fe9c52d06cb8a9b3a06ca0e

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>
Diffstat:
Msrc/nvim/cmdexpand.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c @@ -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); }