mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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;
|
ht = &globvarht;
|
||||||
ret = find_var_in_ht(ht, *name, auto_name, TRUE);
|
ret = find_var_in_ht(ht, *name, auto_name, TRUE);
|
||||||
|
vim_free(auto_name);
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
{
|
{
|
||||||
if (htp != NULL)
|
if (htp != NULL)
|
||||||
@@ -2896,7 +2897,6 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vim_free(auto_name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4084,
|
||||||
/**/
|
/**/
|
||||||
4083,
|
4083,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user