changeset 28493:9f8563d05629 v8.2.4771

patch 8.2.4771: Coverity warns for not checking return value Commit: https://github.com/vim/vim/commit/066e0d9869a16d89b1b2336b4150f476c5337283 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 17 13:17:40 2022 +0100 patch 8.2.4771: Coverity warns for not checking return value Problem: Coverity warns for not checking return value. Solution: Check return value of rettv_dict_alloc().
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Apr 2022 14:30:03 +0200
parents 6e3c5d230787
children 6a015080f040
files src/channel.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -4549,7 +4549,8 @@ ch_expr_common(typval_T *argvars, typval
 	dictitem_T	*di;
 
 	// return an empty dict by default
-	rettv_dict_alloc(rettv);
+	if (rettv_dict_alloc(rettv) == FAIL)
+	    return;
 
 	if (argvars[1].v_type != VAR_DICT)
 	{
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4771,
+/**/
     4770,
 /**/
     4769,