mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Add more missing PyErr_NoMemory() after failled memory allocs
This commit is contained in:
parent
42f08ac1e3
commit
ec74f2fda7
3 changed files with 4 additions and 4 deletions
|
@ -2050,7 +2050,7 @@ Tkapp_CreateCommand(PyObject *_self, PyObject *args)
|
|||
|
||||
data = PyMem_NEW(PythonCmd_ClientData, 1);
|
||||
if (!data)
|
||||
return NULL;
|
||||
return PyErr_NoMemory();
|
||||
Py_XINCREF(self);
|
||||
Py_XINCREF(func);
|
||||
data->self = _self;
|
||||
|
|
|
@ -2251,7 +2251,7 @@ posix_execv(PyObject *self, PyObject *args)
|
|||
argvlist = PyMem_NEW(char *, argc+1);
|
||||
if (argvlist == NULL) {
|
||||
PyMem_Free(path);
|
||||
return NULL;
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (!PyArg_Parse((*getitem)(argv, i), "et",
|
||||
|
@ -2480,7 +2480,7 @@ posix_spawnv(PyObject *self, PyObject *args)
|
|||
argvlist = PyMem_NEW(char *, argc+1);
|
||||
if (argvlist == NULL) {
|
||||
PyMem_Free(path);
|
||||
return NULL;
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (!PyArg_Parse((*getitem)(argv, i), "et",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue