mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -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