# HG changeset patch # User Bram Moolenaar # Date 1567362604 -7200 # Node ID 70ed823bdbb67b9988ddca4f6414a5dd1dca04de # Parent 0949a73e363f1a6340e0861a6cd79c908cd51d6f patch 8.1.1962: leaking memory when using tagfunc() Commit: https://github.com/vim/vim/commit/55008aad50601cae079037fda8fb434cde70c0f4 Author: Bram Moolenaar Date: Sun Sep 1 20:21:56 2019 +0200 patch 8.1.1962: leaking memory when using tagfunc() Problem: Leaking memory when using tagfunc(). Solution: Free the user_data. (Dominique Pelle, closes https://github.com/vim/vim/issues/4886) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1962, +/**/ 1961, /**/ 1960, diff --git a/src/window.c b/src/window.c --- a/src/window.c +++ b/src/window.c @@ -4892,8 +4892,10 @@ win_free( win_free_lsize(wp); for (i = 0; i < wp->w_tagstacklen; ++i) + { vim_free(wp->w_tagstack[i].tagname); - + vim_free(wp->w_tagstack[i].user_data); + } vim_free(wp->w_localdir); /* Remove the window from the b_wininfo lists, it may happen that the