changeset 8921:c3e7cc135754 v7.4.1747

commit https://github.com/vim/vim/commit/fe4b18640656ddea41f60cf7a76956c9cc5494d6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 15 21:47:54 2016 +0200 patch 7.4.1747 Problem: Coverity: missing check for NULL pointer. Solution: Check for out of memory.
author Christian Brabandt <cb@256bit.org>
date Fri, 15 Apr 2016 22:00:07 +0200
parents 32a663a03f3d
children 1f9cb2eb4103
files src/if_py_both.h src/version.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtyp
 	    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++);
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1747,
+/**/
     1746,
 /**/
     1745,