0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4056: Vim9: memory leak when exporting function in autoload script

Problem:    Vim9: memory leak when exporting function in autoload script.
Solution:   Fee the name if replacing it.
This commit is contained in:
Bram Moolenaar
2022-01-10 19:21:06 +00:00
parent 5e6b9882fe
commit 6990b78f25
2 changed files with 3 additions and 0 deletions

View 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;
}
}