diff -Naur a/Python-2.7.10/Modules/_json.c b/Python-2.7.10/Modules/_json.c --- a/Python-2.7.10/Modules/_json.c 2015-05-23 21:39:18.000000000 +0530 +++ b/Python-2.7.10/Modules/_json.c 2015-07-24 13:05:20.200431150 +0530 @@ -2402,6 +2402,8 @@ if (PyType_Ready(&PyEncoderType) < 0) return; m = Py_InitModule3("_json", speedups_methods, module_doc); + if (m == NULL) + return; Py_INCREF((PyObject*)&PyScannerType); PyModule_AddObject(m, "make_scanner", (PyObject*)&PyScannerType); Py_INCREF((PyObject*)&PyEncoderType);