diff Modules/selectmodule.c @ 39893:6fb46e87d5f9 2.4

[Backport of rev. 42093 by neal.norwitz] Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
author Andrew M. Kuchling <amk@amk.ca>
date Wed, 27 Sep 2006 19:17:32 +0000
parents fd08918394f9
children cc84ee6667b7 7fdc639bc5b4
line wrap: on
line diff
--- a/Modules/selectmodule.c	Wed Sep 27 19:04:53 2006 +0000
+++ b/Modules/selectmodule.c	Wed Sep 27 19:17:32 2006 +0000
@@ -662,6 +662,8 @@
 {
 	PyObject *m;
 	m = Py_InitModule3("select", select_methods, module_doc);
+	if (m == NULL)
+		return;
 
 	SelectError = PyErr_NewException("select.error", NULL, NULL);
 	Py_INCREF(SelectError);