Skip to content

Commit fe4b186

Browse files
committed
patch 7.4.1747
Problem: Coverity: missing check for NULL pointer. Solution: Check for out of memory.
1 parent 95509e1 commit fe4b186

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/if_py_both.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
29222922
if (argc != 0)
29232923
{
29242924
argv = PyMem_New(typval_T, (size_t) argc);
2925+
if (argv == NULL)
2926+
{
2927+
PyErr_NoMemory();
2928+
dict_unref(selfdict);
2929+
list_unref(argslist);
2930+
return NULL;
2931+
}
29252932
curtv = argv;
29262933
for (li = argslist->lv_first; li != NULL; li = li->li_next)
29272934
copy_tv(&li->li_tv, curtv++);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1747,
751753
/**/
752754
1746,
753755
/**/

0 commit comments

Comments
 (0)