patch 9.2.0067: memory leak in dict_extend_func()

Commit: 
https://github.com/vim/vim/commit/8ba12766d1ceae6630eb2ecb6b75436391341d5f
Author: Huihui Huang <[email protected]>
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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

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,
 /**/

-- 
-- 
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/E1vvivr-00Ed1Q-VI%40256bit.org.

Raspunde prin e-mail lui