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/cmathmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/cmathmodule.c') diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index 78b9dd5f8f..ec48ce8d72 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -417,6 +417,8 @@ initcmath(void) PyObject *m; m = Py_InitModule3("cmath", cmath_methods, module_doc); + if (m == NULL) + return; PyModule_AddObject(m, "pi", PyFloat_FromDouble(atan(1.0) * 4.0)); -- cgit v1.2.1