]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0057: memory leak in exe_newdict() v9.2.0057
authorHuihui Huang <625173@qq.com>
Wed, 25 Feb 2026 20:18:16 +0000 (20:18 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 25 Feb 2026 20:18:16 +0000 (20:18 +0000)
Problem:  memory leak in exe_newdict()
Solution: Free the variable item (Huihui Huang).

closes: #PR

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/vim9execute.c

index af8e5e13edd0e44c4088bd2e923522ff6ee9dca2..c78d36663dd510b334c7b15e178434fd4bc65655 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    57,
 /**/
     56,
 /**/
index 03417baaee0737fc4e4ab65a991a8537b32c126e..c58992f5dc91db546f22d820f15bf5f5f070f6a8 100644 (file)
@@ -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;
            }