From c99e182e1fb54e39540d25d0ccd8dcdde25bb96c Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sat, 3 Sep 2022 10:52:24 +0100 Subject: patch 9.0.0364: clang static analyzer gives warnings Problem: Clang static analyzer gives warnings. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #11043) --- src/tag.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tag.c') diff --git a/src/tag.c b/src/tag.c index 3141e7686..c1f6e65f4 100644 --- a/src/tag.c +++ b/src/tag.c @@ -4368,7 +4368,12 @@ get_tags(list_T *list, char_u *pat, char_u *buf_fname) { for (i = 0; i < num_matches; ++i) { - parse_match(matches[i], &tp); + if (parse_match(matches[i], &tp) == FAIL) + { + vim_free(matches[i]); + continue; + } + is_static = test_for_static(&tp); // Skip pseudo-tag lines. -- cgit v1.2.1