]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1941: Memory leak detected v9.0.1941
authorYegappan Lakshmanan <yegappan@yahoo.com>
Mon, 25 Sep 2023 10:13:17 +0000 (12:13 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 25 Sep 2023 10:13:17 +0000 (12:13 +0200)
Problem:  Memory leak detected (after 9.0.1928)
Solution: Free arg_objm in get_lambda_tv()

closes: #13181

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
src/userfunc.c
src/version.c

index a27ff984d5358217637d6c99012b9fa49614ca05..e0c1d5f9196f6f0a23fc22c751013ca9c839200e 100644 (file)
@@ -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);
     }
index 1d3ce5ec9e626d209b13bee32f957c2a7ecd731a..168c10cacb94255a843ad260bcf66b88f2cb50aa 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1941,
 /**/
     1940,
 /**/