Skip to content

Commit 55008aa

Browse files
committed
patch 8.1.1962: leaking memory when using tagfunc()
Problem: Leaking memory when using tagfunc(). Solution: Free the user_data. (Dominique Pelle, closes #4886)
1 parent a144983 commit 55008aa

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1962,
764766
/**/
765767
1961,
766768
/**/

src/window.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4892,8 +4892,10 @@ win_free(
48924892
win_free_lsize(wp);
48934893

48944894
for (i = 0; i < wp->w_tagstacklen; ++i)
4895+
{
48954896
vim_free(wp->w_tagstack[i].tagname);
4896-
4897+
vim_free(wp->w_tagstack[i].user_data);
4898+
}
48974899
vim_free(wp->w_localdir);
48984900

48994901
/* Remove the window from the b_wininfo lists, it may happen that the

0 commit comments

Comments
 (0)