summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c2
-rw-r--r--Modules/posixmodule.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index b9dc179..4e6bcbc 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9dea4b5..c6e1a87 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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",