1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2022-01-13 20:39:41 +00:00
parent 0e3e7ba05f
commit 130f65d46b
2 changed files with 3 additions and 1 deletions

View File

@@ -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);
}
}

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4084,
/**/
4083,
/**/