# HG changeset patch # User Bram Moolenaar # Date 1641843004 -3600 # Node ID d4e7e3d82e78b5c08bef6db1956a3bf06517b576 # Parent f8f463374edafeca1b1c32c2ef7ed4481688a84c patch 8.2.4056: Vim9: memory leak when exporting function in autoload script Commit: https://github.com/vim/vim/commit/6990b78f253eb7f3ebd296fd5c8353e3da1cc8f2 Author: Bram Moolenaar Date: Mon Jan 10 19:21:06 2022 +0000 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. diff --git a/src/scriptfile.c b/src/scriptfile.c --- 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; } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4056, +/**/ 4055, /**/ 4054,