From 6990b78f253eb7f3ebd296fd5c8353e3da1cc8f2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 10 Jan 2022 19:21:06 +0000 Subject: [PATCH] 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. --- src/scriptfile.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/scriptfile.c b/src/scriptfile.c index 7c5da2e96f..948866636a 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; } } diff --git a/src/version.c b/src/version.c index e46a3802b5..6b7f110577 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4056, /**/ 4055, /**/