patch 9.0.1941: Memory leak detected

Commit: 
https://github.com/vim/vim/commit/3aa114463f0219eba2e9fe0517067be9fcaf8248
Author: Yegappan Lakshmanan <[email protected]>
Date:   Mon Sep 25 12:13:17 2023 +0200

    patch 9.0.1941: Memory leak detected
    
    Problem:  Memory leak detected (after 9.0.1928)
    Solution: Free arg_objm in get_lambda_tv()
    
    closes: #13181
    
    Signed-off-by: Christian Brabandt <[email protected]>
    Co-authored-by: Yegappan Lakshmanan <[email protected]>

diff --git a/src/userfunc.c b/src/userfunc.c
index a27ff984d..e0c1d5f91 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1721,7 +1721,10 @@ theend:
     eval_lavars_used = old_eval_lavars;
     vim_free(tofree2);
     if (types_optional)
+    {
        ga_clear_strings(&argtypes);
+       ga_clear(&arg_objm);
+    }
 
     return OK;
 
@@ -1732,6 +1735,7 @@ errret:
     if (types_optional)
     {
        ga_clear_strings(&argtypes);
+       ga_clear(&arg_objm);
        if (fp != NULL)
            vim_free(fp->uf_arg_types);
     }
diff --git a/src/version.c b/src/version.c
index 1d3ce5ec9..168c10cac 100644
--- a/src/version.c
+++ b/src/version.c
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1941,
 /**/
     1940,
 /**/

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qkiqr-00AsSq-Mz%40256bit.org.

Raspunde prin e-mail lui