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 92dcd76..d111b80 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2889,6 +2889,7 @@
{
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 @@
return ret;
}
}
- vim_free(auto_name);
}
}