summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-11 15:07:22 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-11 15:07:22 +0100
commita0221df149aa3773450b3f930299a409dd75bd5b (patch)
tree3565d5f97f29d9cca54318bdc72fcc1da6bc366e /src/ops.c
parent0549a1e184d33674f4c2b8fb44ccdf6b9b9808a3 (diff)
downloadvim-git-a0221df149aa3773450b3f930299a409dd75bd5b.tar.gz
patch 8.0.1501: out-of-memory situation not correctly handledv8.0.1501
Problem: Out-of-memory situation not correctly handled. (Coverity) Solution: Check for NULL value.
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index 830de0ba6..232dc30a4 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1668,6 +1668,8 @@ yank_do_autocmd(oparg_T *oap, yankreg_T *reg)
v_event = get_vim_var_dict(VV_EVENT);
list = list_alloc();
+ if (list == NULL)
+ return;
for (n = 0; n < reg->y_size; n++)
list_append_string(list, reg->y_array[n], -1);
list->lv_lock = VAR_FIXED;