mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
31f31b40a8
commit
b7447a909f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user