vim-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 vim/vim#5553)
70b3e706b4
This commit is contained in:
Jan Edmund Lazo 2020-01-29 21:01:59 -05:00
parent 31f31b40a8
commit b7447a909f
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -3158,9 +3158,11 @@ int get_tags(list_T *list, char_u *pat, char_u *buf_fname)
is_static = test_for_static(&tp);
/* Skip pseudo-tag lines. */
if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0)
// Skip pseudo-tag lines.
if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0) {
xfree(matches[i]);
continue;
}
dict = tv_dict_alloc();
tv_list_append_dict(list, dict);