]> granicus.if.org Git - vim/commitdiff
patch 7.4.2257 v7.4.2257
authorBram Moolenaar <Bram@vim.org>
Fri, 26 Aug 2016 14:39:03 +0000 (16:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 26 Aug 2016 14:39:03 +0000 (16:39 +0200)
Problem:    Coverity complains about not checking for NULL.
Solution:   Check for out of memory.

src/if_py_both.h
src/version.c

index 35ad5d03c6034e9e362f077901dcddf90885e603..c44fc93acbd024b3d6c37af272f57737abc51c68 100644 (file)
@@ -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);
index ec0dca88b1ca30b3e086910b67a2c671eb429801..9feaa0280874808c286ca3082cc0f596724c69b1 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2257,
 /**/
     2256,
 /**/