diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-03 12:59:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-03 12:59:19 +0100 |
commit | 89083466fa565bea22832687ec5fe89a70a3b8f7 (patch) | |
tree | 915aff5203c0751958e535b40fd838f348b223e9 | |
parent | 0a6bb59f6b198b351555dc0919816c9f0f1e3ed9 (diff) | |
download | vim-git-89083466fa565bea22832687ec5fe89a70a3b8f7.tar.gz |
patch 9.0.0368: old Coverity warning for using NULL pointerv9.0.0368
Problem: Old Coverity warning for using NULL pointer.
Solution: Bail out if dictionary allocation fails.
-rw-r--r-- | src/tag.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -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 e8f40e4c7..b2e28e297 100644 --- a/src/version.c +++ b/src/version.c @@ -708,6 +708,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 368, +/**/ 367, /**/ 366, |