Skip to content

Commit

Permalink
patch 8.2.4084: memory leak when looking for autoload prefixed variable
Browse files Browse the repository at this point in the history
Problem:    Memory leak when looking for autoload prefixed variable.
Solution:   Free the concatenated string.
  • Loading branch information
brammool committed Jan 13, 2022
1 parent 0e3e7ba commit 130f65d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/evalvars.c
Original file line number Diff line number Diff line change
Expand Up @@ -2889,14 +2889,14 @@ 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)
*htp = ht;
return ret;
}
}
vim_free(auto_name);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4084,
/**/
4083,
/**/
Expand Down

0 comments on commit 130f65d

Please sign in to comment.