Commit: patch 9.2.0244: memory leak in eval8()

0 views
Skip to first unread message

Christian Brabandt

unread,
Mar 25, 2026, 3:32:13 PM (15 hours ago) Mar 25
to vim...@googlegroups.com
patch 9.2.0244: memory leak in eval8()

Commit: https://github.com/vim/vim/commit/e2cf84d0a0fb5d880e36a599ea9f2a3b95ed67a1
Author: Huihui Huang <625...@qq.com>
Date: Wed Mar 25 19:26:38 2026 +0000

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 <625...@qq.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/eval.c b/src/eval.c
index ba18a4159..e8b9cc830 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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);
diff --git a/src/version.c b/src/version.c
index 75ff30ec9..d6021159d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 244,
/**/
243,
/**/
Reply all
Reply to author
Forward
0 new messages