patch 9.2.0105: memory leak in heredoc_get() in src/evalvars.c

Problem:  memory leak in heredoc_get() in src/evalvars.c
Solution: Free variable l on early return (Huihui Huang).

closes: #19563

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Huihui Huang
2026-03-03 20:35:48 +00:00
committed by Christian Brabandt
parent 2a7414594a
commit 7d1e0a7832
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -949,6 +949,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile)
{
vim_free(theline);
vim_free(text_indent);
list_free(l);
return FAIL;
}
count++;
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
105,
/**/
104,
/**/