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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4084,
|
||||
/**/
|
||||
4083,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user