patch 9.2.0079: memory leak in eval_dict()

Problem:  memory leak in eval_dict()
Solution: Do not return but goto failret (Huihui Huang).

closes: #19531

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Huihui Huang
2026-02-28 17:01:53 +00:00
committed by Christian Brabandt
parent 4e5b9e31cb
commit 525d1d6a94
2 changed files with 3 additions and 1 deletions

View File

@@ -994,7 +994,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
{
emsg(_(e_missing_matching_bracket_after_dict_key));
clear_tv(&tvkey);
return FAIL;
goto failret;
}
++*arg;
}

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
79,
/**/
78,
/**/