0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -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. // Skip pseudo-tag lines.
if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0) if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0)
{
vim_free(matches[i]);
continue; continue;
}
if ((dict = dict_alloc()) == NULL) if ((dict = dict_alloc()) == NULL)
ret = FAIL; ret = FAIL;

View File

@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
177,
/**/ /**/
176, 176,
/**/ /**/