]> granicus.if.org Git - vim/commitdiff
patch 7.4.1747 v7.4.1747
authorBram Moolenaar <Bram@vim.org>
Fri, 15 Apr 2016 19:47:54 +0000 (21:47 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 15 Apr 2016 19:47:54 +0000 (21:47 +0200)
Problem:    Coverity: missing check for NULL pointer.
Solution:   Check for out of memory.

src/if_py_both.h
src/version.c

index c6a8c44635513c563583d46793c8aeea876c2300..de3e8680b573cc93d8daf3a0260a6fb2aec1ab7d 100644 (file)
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
            if (argc != 0)
            {
                argv = PyMem_New(typval_T, (size_t) argc);
+               if (argv == NULL)
+               {
+                   PyErr_NoMemory();
+                   dict_unref(selfdict);
+                   list_unref(argslist);
+                   return NULL;
+               }
                curtv = argv;
                for (li = argslist->lv_first; li != NULL; li = li->li_next)
                    copy_tv(&li->li_tv, curtv++);
index 74e5f92359a72edd1435e24a8c2494d14313fae0..d7544b830023a762f1cf3f55e88689814ee65de2 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1747,
 /**/
     1746,
 /**/