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 /src/tag.c | |
parent | e258368b4fb22fe5fc9bf510ac303a3542ff8e83 (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.c | 3 |
1 files changed, 3 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; |