summaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-29 22:38:45 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-29 22:38:45 +0100
commit70b3e706b40fc2c84c1f9f33fa64945a481df395 (patch)
tree629d59ecf595bf544b8ebc218194c49b84f4a851 /src/tag.c
parente258368b4fb22fe5fc9bf510ac303a3542ff8e83 (diff)
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)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tag.c b/src/tag.c
index 4c6dadcf21..cfc300e465 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -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;