Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 9c647c5..e12bef8 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -303,6 +303,8 @@
if (PyType_Ready(&MD5type) < 0)
return;
m = Py_InitModule3("_md5", md5_functions, module_doc);
+ if (m == NULL)
+ return;
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "MD5Type", (PyObject *)&MD5type);
PyModule_AddIntConstant(m, "digest_size", 16);