From 89083466fa565bea22832687ec5fe89a70a3b8f7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 3 Sep 2022 12:59:19 +0100 Subject: [PATCH] patch 9.0.0368: old Coverity warning for using NULL pointer Problem: Old Coverity warning for using NULL pointer. Solution: Bail out if dictionary allocation fails. --- src/tag.c | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/tag.c b/src/tag.c index c1f6e65f45..c3e23f624e 100644 --- a/src/tag.c +++ b/src/tag.c @@ -4384,7 +4384,11 @@ get_tags(list_T *list, char_u *pat, char_u *buf_fname) } if ((dict = dict_alloc()) == NULL) + { ret = FAIL; + vim_free(matches[i]); + break; + } if (list_append_dict(list, dict) == FAIL) ret = FAIL; diff --git a/src/version.c b/src/version.c index e8f40e4c7f..b2e28e2970 100644 --- a/src/version.c +++ b/src/version.c @@ -707,6 +707,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 368, /**/ 367, /**/