]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4056: Vim9: memory leak when exporting function in autoload script v8.2.4056
authorBram Moolenaar <Bram@vim.org>
Mon, 10 Jan 2022 19:21:06 +0000 (19:21 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 10 Jan 2022 19:21:06 +0000 (19:21 +0000)
Problem:    Vim9: memory leak when exporting function in autoload script.
Solution:   Fee the name if replacing it.

src/scriptfile.c
src/version.c

index 7c5da2e96ff88d4ab6fde98bd340355389b58603..948866636a81afef0e3640e331dc1bb24eb0b88b 100644 (file)
@@ -2210,6 +2210,7 @@ may_prefix_autoload(char_u *name)
            {
                vim_snprintf((char *)res, len, "%s%s",
                                             si->sn_autoload_prefix, basename);
+               vim_free(name);
                return res;
            }
        }
index e46a3802b58e09d7366e132312e3bdcb751b19ab..6b7f110577514a7e73d6974622d545ade0a09b2d 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4056,
 /**/
     4055,
 /**/