patch 9.2.0057: memory leak in exe_newdict()
Commit:
https://github.com/vim/vim/commit/71ace8ba8c5cebb0f1480dc69ff940450eb70689
Author: Huihui Huang <[email protected]>
Date: Wed Feb 25 20:18:16 2026 +0000
patch 9.2.0057: memory leak in exe_newdict()
Problem: memory leak in exe_newdict()
Solution: Free the variable item (Huihui Huang).
closes: #PR
Signed-off-by: Huihui Huang <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/version.c b/src/version.c
index af8e5e13e..c78d36663 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 */
+/**/
+ 57,
/**/
56,
/**/
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 03417baae..c58992f5d 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -290,6 +290,7 @@ exe_newdict(int count, ectx_T *ectx)
if (dict_add(dict, item) == FAIL)
{
// can this ever happen?
+ dictitem_free(item);
dict_unref(dict);
return FAIL;
}
--
--
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/E1vvLWF-00Cw4l-Gx%40256bit.org.