]> granicus.if.org Git - vim/commitdiff
patch 8.1.1962: leaking memory when using tagfunc() v8.1.1962
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Sep 2019 18:21:56 +0000 (20:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Sep 2019 18:21:56 +0000 (20:21 +0200)
Problem:    Leaking memory when using tagfunc().
Solution:   Free the user_data. (Dominique Pelle, closes #4886)

src/version.c
src/window.c

index 6b30e7cf550cdf6f382fafae9c2c3dd28dbbc9e2..7fd13b802f00f66702981db28f35d403739c1b87 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1962,
 /**/
     1961,
 /**/
index 6f27c5c14907596f0c49248d3f4a6542505794e0..4abceb4d9a89218348cc943971aacb6eeb02cc2b 100644 (file)
@@ -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