patch 9.2.0244: memory leak in eval8()

Problem:  memory leak in eval8()
Solution: Free type_list() even when evaluate is FALSE
          (Huihui Huang)

closes: #19819

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-25 19:26:38 +00:00
committed by Christian Brabandt
parent 0effd2faf9
commit e2cf84d0a0
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -4856,9 +4856,9 @@ eval8(
res = eval9(arg, rettv, evalarg, want_string);
if (want_type != NULL && evaluate)
if (want_type != NULL)
{
if (res == OK)
if (evaluate && res == OK)
{
type_T *actual = typval2type(rettv, get_copyID(), &type_list,
TVTT_DO_MEMBER);
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
244,
/**/
243,
/**/