summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-17 13:17:40 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-17 13:17:40 +0100
commit066e0d9869a16d89b1b2336b4150f476c5337283 (patch)
tree8486f1f4ceab19bd9b1d7a81ac8b76a7b2f459f3 /src/channel.c
parentefbfa867a146fcd93fdec2435597aa4ae7f1325c (diff)
patch 8.2.4771: Coverity warns for not checking return valuev8.2.4771
Problem: Coverity warns for not checking return value. Solution: Check return value of rettv_dict_alloc().
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index ef747d0e25..79f4dbc29b 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -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)
{