Issue #24704: Fixed possible NULL pointer dereferencing in the _json module
initialization.  Patch by Pankaj Sharma.
diff --git a/Modules/_json.c b/Modules/_json.c
index 3349b0c..121126d 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -2419,6 +2419,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);