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

Probably should be backported.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index b783573..100dfcf 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7967,6 +7967,8 @@
 	m = Py_InitModule3(MODNAME,
 			   posix_methods,
 			   posix__doc__);
+	if (m == NULL)
+    		return;
 
 	/* Initialize environ dictionary */
 	v = convertenviron();