Skip to content

Commit

Permalink
patch 8.2.4182: memory leak when evaluating 'diffexpr'
Browse files Browse the repository at this point in the history
Problem:    Memory leak when evaluating 'diffexpr'.
Solution:   Use free_tv() instead of clear_tv().
  • Loading branch information
brammool committed Jan 22, 2022
1 parent 7b29f6a commit 39b8944
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 @@ -429,7 +429,7 @@ eval_diff(

// errors are ignored
tv = eval_expr(p_dex, NULL);
clear_tv(tv);
free_tv(tv);

set_vim_var_string(VV_FNAME_IN, NULL, -1);
set_vim_var_string(VV_FNAME_NEW, NULL, -1);
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 */
/**/
4182,
/**/
4181,
/**/
Expand Down

0 comments on commit 39b8944

Please sign in to comment.