From: Bram Moolenaar Date: Thu, 13 Jan 2022 20:39:41 +0000 (+0000) Subject: patch 8.2.4084: memory leak when looking for autoload prefixed variable X-Git-Tag: v8.2.4084 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=130f65d46bca94535d30cef518a6184613fb7ebf;p=thirdparty%2Fvim.git patch 8.2.4084: memory leak when looking for autoload prefixed variable Problem: Memory leak when looking for autoload prefixed variable. Solution: Free the concatenated string. --- diff --git a/src/evalvars.c b/src/evalvars.c index 92dcd76975..d111b80ff8 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -2889,6 +2889,7 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload) { ht = &globvarht; ret = find_var_in_ht(ht, *name, auto_name, TRUE); + vim_free(auto_name); if (ret != NULL) { if (htp != NULL) @@ -2896,7 +2897,6 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload) return ret; } } - vim_free(auto_name); } } diff --git a/src/version.c b/src/version.c index ecfa17d456..957ccee0c9 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 */ +/**/ + 4084, /**/ 4083, /**/