summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-26 16:39:03 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-26 16:39:03 +0200
commit9f28953f0c1e3d9fffd49af76503f54eaa279acb (patch)
treee56de01b7932e9c941f59a0dcc06cd8e9c65196c
parentdb249f26edf7a5f88d1f4468d08ec5b84f5ab7ad (diff)
downloadvim-git-7.4.2257.tar.gz
patch 7.4.2257v7.4.2257
Problem: Coverity complains about not checking for NULL. Solution: Check for out of memory.
-rw-r--r--src/if_py_both.h4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 35ad5d03c..c44fc93ac 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -3009,9 +3009,9 @@ FunctionAttr(FunctionObject *self, char *name)
return PyString_FromString((char *)(self->name));
else if (strcmp(name, "args") == 0)
{
- if (self->argv == NULL)
+ if (self->argv == NULL || (list = list_alloc()) == NULL)
return AlwaysNone(NULL);
- list = list_alloc();
+
for (i = 0; i < self->argc; ++i)
list_append_tv(list, &self->argv[i]);
return NEW_LIST(list);
diff --git a/src/version.c b/src/version.c
index ec0dca88b..9feaa0280 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2257,
+/**/
2256,
/**/
2255,