summaryrefslogtreecommitdiff
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-19 06:09:39 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-19 06:09:39 +0000
commitbc26c3d05080a66c1f4070b87bac5188e5dfab85 (patch)
tree395453563b1bc2f5b8d7321046a9790f6e1a8460 /Modules/selectmodule.c
parentbe04cc0bec9a7ca748a957384795af18aacd08c1 (diff)
downloadcpython-bc26c3d05080a66c1f4070b87bac5188e5dfab85.tar.gz
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index ed2ea8197c..53c68c1a55 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -662,6 +662,8 @@ initselect(void)
{
PyObject *m;
m = Py_InitModule3("select", select_methods, module_doc);
+ if (m == NULL)
+ return;
SelectError = PyErr_NewException("select.error", NULL, NULL);
Py_INCREF(SelectError);