summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-01 20:21:56 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-01 20:21:56 +0200
commit55008aad50601cae079037fda8fb434cde70c0f4 (patch)
treeb8e744780c940f547b45228ce787c08a465e8495
parenta1449836334355b1fb00cd1bf083e7d353f6c4d7 (diff)
downloadvim-git-8.1.1962.tar.gz
patch 8.1.1962: leaking memory when using tagfunc()v8.1.1962
Problem: Leaking memory when using tagfunc(). Solution: Free the user_data. (Dominique Pelle, closes #4886)
-rw-r--r--src/version.c2
-rw-r--r--src/window.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c
index 6b30e7cf5..7fd13b802 100644
--- 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
index 6f27c5c14..4abceb4d9 100644
--- 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