]> granicus.if.org Git - vim/commitdiff
patch 8.2.4771: Coverity warns for not checking return value v8.2.4771
authorBram Moolenaar <Bram@vim.org>
Sun, 17 Apr 2022 12:17:40 +0000 (13:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 17 Apr 2022 12:17:40 +0000 (13:17 +0100)
Problem:    Coverity warns for not checking return value.
Solution:   Check return value of rettv_dict_alloc().

src/channel.c
src/version.c

index ef747d0e25a142328382a0e6fcf9f788fa98073f..79f4dbc29b0e74152d37f840c8f1cd5cc3808de7 100644 (file)
@@ -4549,7 +4549,8 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
        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)
        {
index 90b0b12386f5b62fd540d6b1a7ffb6d7c9543f73..c5ac7c5eee14c9c0c21c2650b8720be54d04a31f 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4771,
 /**/
     4770,
 /**/