summaryrefslogtreecommitdiff
path: root/src/scriptfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-10 19:21:06 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-10 19:21:06 +0000
commit6990b78f253eb7f3ebd296fd5c8353e3da1cc8f2 (patch)
tree90271e02d1725a343edcd00817ace34dd60c3603 /src/scriptfile.c
parent5e6b9882fe0218ae4878f6ad0561c8654a2277d8 (diff)
downloadvim-git-6990b78f253eb7f3ebd296fd5c8353e3da1cc8f2.tar.gz
patch 8.2.4056: Vim9: memory leak when exporting function in autoload scriptv8.2.4056
Problem: Vim9: memory leak when exporting function in autoload script. Solution: Fee the name if replacing it.
Diffstat (limited to 'src/scriptfile.c')
-rw-r--r--src/scriptfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 7c5da2e96..948866636 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -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;
}
}