summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-09-03 10:52:24 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-03 10:52:24 +0100
commitc99e182e1fb54e39540d25d0ccd8dcdde25bb96c (patch)
treed0cec00ea2cd55d8fb68d353712b70d8be952e5f /src/tag.c
parentb18b49699776485150b71626069a40d12d2c5590 (diff)
downloadvim-git-c99e182e1fb54e39540d25d0ccd8dcdde25bb96c.tar.gz
patch 9.0.0364: clang static analyzer gives warningsv9.0.0364
Problem: Clang static analyzer gives warnings. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #11043)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c7
1 files changed, 6 insertions, 1 deletions
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.