changeset 30061:f4a7831fa352 v9.0.0368

patch 9.0.0368: old Coverity warning for using NULL pointer Commit: https://github.com/vim/vim/commit/89083466fa565bea22832687ec5fe89a70a3b8f7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 3 12:59:19 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Sep 2022 14:00:04 +0200
parents 4d69338df279
children 922a7448e330
files src/tag.c src/version.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tag.c
+++ b/src/tag.c
@@ -4384,7 +4384,11 @@ get_tags(list_T *list, char_u *pat, char
 	    }
 
 	    if ((dict = dict_alloc()) == NULL)
+	    {
 		ret = FAIL;
+		vim_free(matches[i]);
+		break;
+	    }
 	    if (list_append_dict(list, dict) == FAIL)
 		ret = FAIL;
 
--- 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,