0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1747

Problem:    Coverity: missing check for NULL pointer.
Solution:   Check for out of memory.
This commit is contained in:
Bram Moolenaar
2016-04-15 21:47:54 +02:00
parent 95509e18f8
commit fe4b186406
2 changed files with 9 additions and 0 deletions

View File

@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
if (argc != 0) if (argc != 0)
{ {
argv = PyMem_New(typval_T, (size_t) argc); argv = PyMem_New(typval_T, (size_t) argc);
if (argv == NULL)
{
PyErr_NoMemory();
dict_unref(selfdict);
list_unref(argslist);
return NULL;
}
curtv = argv; curtv = argv;
for (li = argslist->lv_first; li != NULL; li = li->li_next) for (li = argslist->lv_first; li != NULL; li = li->li_next)
copy_tv(&li->li_tv, curtv++); copy_tv(&li->li_tv, curtv++);

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1747,
/**/ /**/
1746, 1746,
/**/ /**/