diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-29 22:38:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-29 22:38:45 +0100 |
commit | 70b3e706b40fc2c84c1f9f33fa64945a481df395 (patch) | |
tree | 629d59ecf595bf544b8ebc218194c49b84f4a851 | |
parent | e258368b4fb22fe5fc9bf510ac303a3542ff8e83 (diff) | |
download | vim-git-70b3e706b40fc2c84c1f9f33fa64945a481df395.tar.gz |
patch 8.2.0177: memory leak in get_tags()v8.2.0177
Problem: Memory leak in get_tags().
Solution: Free matches when finding a pseudo-tag line. (Dominique Pelle,
closes #5553)
-rw-r--r-- | src/tag.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -3980,7 +3980,10 @@ get_tags(list_T *list, char_u *pat, char_u *buf_fname) // Skip pseudo-tag lines. if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0) + { + vim_free(matches[i]); continue; + } if ((dict = dict_alloc()) == NULL) ret = FAIL; diff --git a/src/version.c b/src/version.c index fbb2ca554..e6935a289 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 177, +/**/ 176, /**/ 175, |