Check return result from Py_InitModule*().  This API can fail.

Probably should be backported.
diff --git a/Modules/termios.c b/Modules/termios.c
index a1d14a1..c53566c 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -910,6 +910,8 @@
 
 	m = Py_InitModule4("termios", termios_methods, termios__doc__,
                            (PyObject *)NULL, PYTHON_API_VERSION);
+	if (m == NULL)
+		return;
 
 	if (TermiosError == NULL) {
 		TermiosError = PyErr_NewException("termios.error", NULL, NULL);