]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0244: memory leak in eval8() v9.2.0244
authorHuihui Huang <625173@qq.com>
Wed, 25 Mar 2026 19:26:38 +0000 (19:26 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 25 Mar 2026 19:26:38 +0000 (19:26 +0000)
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>
src/eval.c
src/version.c

index ba18a41597143308d20994e708d1023643d1e2e2..e8b9cc83033cf704b6aaeede6eef3215841d52b8 100644 (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);
index 75ff30ec92b94010be23707e2a2238d653c436a7..d6021159d1698665aae504c142128b9f0ed0fc14 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    244,
 /**/
     243,
 /**/