]> granicus.if.org Git - vim/commitdiff
patch 8.2.2220: Vim9: memory leak when parsing nested parenthesis v8.2.2220
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Dec 2020 21:30:16 +0000 (22:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Dec 2020 21:30:16 +0000 (22:30 +0100)
Problem:    Vim9: memory leak when parsing nested parenthesis.
Solution:   Clear newargs.

src/userfunc.c
src/version.c

index 2bae9ef90cda06fff70abf8bc1c507832c212246..cc41eed7cb9403a48e7018b95e8055556747aa87 100644 (file)
@@ -574,6 +574,7 @@ get_lambda_tv(
     {
        if (types_optional)
            ga_clear_strings(&argtypes);
+       ga_clear_strings(&newargs);
        return white_error ? FAIL : NOTDONE;
     }
     *arg = s;
index 6178cae1b2a90d500479e4cd9b1fe7a23aceda47..63e5badbce5176f1294674a6feee3bd0a541716e 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2220,
 /**/
     2219,
 /**/