From 1ac754fa10f5d199d19911e21185d0970cb3073f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 19 Jan 2006 06:09:39 +0000 Subject: Check return result from Py_InitModule*(). This API can fail. Probably should be backported. --- Modules/regexmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/regexmodule.c') diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index 9f84032e4d..d44993262e 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -653,6 +653,8 @@ initregex(void) Regextype.ob_type = &PyType_Type; m = Py_InitModule("regex", regex_global_methods); + if (m == NULL) + return; d = PyModule_GetDict(m); if (PyErr_Warn(PyExc_DeprecationWarning, -- cgit v1.2.1