mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0055: memory leak in ExpandFromContext()
Problem: memory leak in ExpandFromContext() Solution: Free the variable (Huihui Huang). fixes: #19500 closes: #19505 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
c389ae8c44
commit
9c3279ddc3
+3
-1
@@ -3515,8 +3515,10 @@ ExpandFromContext(
|
||||
{
|
||||
regmatch.regprog = vim_regcomp(pat, magic_isset() ? RE_MAGIC : 0);
|
||||
if (regmatch.regprog == NULL)
|
||||
{
|
||||
vim_free(tofree);
|
||||
return FAIL;
|
||||
|
||||
}
|
||||
// set ignore-case according to p_ic, p_scs and pat
|
||||
regmatch.rm_ic = ignorecase(pat);
|
||||
}
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
55,
|
||||
/**/
|
||||
54,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user