From a0221df149aa3773450b3f930299a409dd75bd5b Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Sun, 11 Feb 2018 15:07:22 +0100
Subject: [PATCH] patch 8.0.1501: out-of-memory situation not correctly handled

Problem:    Out-of-memory situation not correctly handled. (Coverity)
Solution:   Check for NULL value.
---
 src/ops.c     | 2 ++
 src/version.c | 2 ++
 2 files changed, 4 insertions(+)

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;
diff --git a/src/version.c b/src/version.c
index 4cbfc4709..d96f896ee 100644
--- a/src/version.c
+++ b/src/version.c
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1501,
 /**/
     1500,
 /**/
-- 
2.40.0