0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.0177: memory leak in get_tags()

Problem:    Memory leak in get_tags().
Solution:   Free matches when finding a pseudo-tag line. (Dominique Pelle,
            closes #5553)
This commit is contained in:
Bram Moolenaar
2020-01-29 22:38:45 +01:00
parent e258368b4f
commit 70b3e706b4
2 changed files with 5 additions and 0 deletions

View File

@@ -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;