Commit: patch 9.2.0067: memory leak in dict_extend_func()

0 views
Skip to first unread message

Christian Brabandt

unread,
Feb 26, 2026, 4:31:50 PM (6 days ago) Feb 26
to vim...@googlegroups.com
patch 9.2.0067: memory leak in dict_extend_func()

Commit: https://github.com/vim/vim/commit/8ba12766d1ceae6630eb2ecb6b75436391341d5f
Author: Huihui Huang <625...@qq.com>
Date: Thu Feb 26 21:13:40 2026 +0000

patch 9.2.0067: memory leak in dict_extend_func()

Problem: memory leak in dict_extend_func()
Solution: Free d1 on early return (Huihui Huang)

closes: #19518

Signed-off-by: Huihui Huang <625...@qq.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/dict.c b/src/dict.c
index d83024a97..85e451ec7 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1370,7 +1370,11 @@ dict_extend_func(

if (type != NULL && check_typval_arg_type(type, &argvars[1],
func_name, 2) == FAIL)
+ {
+ if (is_new)
+ dict_unref(d1);
return;
+ }
dict_extend(d1, d2, action, func_name);

if (is_new)
diff --git a/src/version.c b/src/version.c
index 6402b27b4..d6194a980 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 */
+/**/
+ 67,
/**/
66,
/**/
Reply all
Reply to author
Forward
0 new messages