patch 9.2.0244: memory leak in eval8()
Commit:
https://github.com/vim/vim/commit/e2cf84d0a0fb5d880e36a599ea9f2a3b95ed67a1
Author: Huihui Huang <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1w5TvZ-005kS4-3r%40256bit.org.